guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hash table read syntax in guile 2.0


From: Daniel Hartwig
Subject: Re: Hash table read syntax in guile 2.0
Date: Mon, 18 Feb 2013 10:01:19 +0800

On 17 February 2013 22:15, Hengqing Hu <address@hidden> wrote:
> I don't know it's intentional or a bug,
> but now object->string returns something different.

It was an intentional change.  Previously you could not tell apart two
distinct hash tables that happened to have the same number of elements
and bucket size.  Now you can, because the output includes an unique
object id.

>
> My understanding of length and fold is the same for deep lists as for
> hash table.

Interesting.  By deep list do you mean a list that has lists as it's
elements, like:

  (define x '((1 2 3) (4 5 6)))

or ..?

>
> It's great you have provided a patch so a constant time way
> to know no of key/value bindings in a hash table could be more accessible..

Its not an operation fundamental to hash-tables (indeed, some
implementations can not determine this in constant time), and I think
that is the main reason for its absence.  What do you use the
information for?

Regards



reply via email to

[Prev in Thread] Current Thread [Next in Thread]