guile-devel
[Top][All Lists]
Advanced

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

Re: Growable arrays?


From: Andy Wingo
Subject: Re: Growable arrays?
Date: Mon, 11 Jun 2012 13:25:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Hi,

On Mon 11 Jun 2012 11:55, David Kastrup <address@hidden> writes:

> Tables are a superset of what I need here.  I need the "growable vector"
> aspect, not the "hash part" aspect.  Guile 1.8 only offers subsets:
> "growable" does not come together with "vector".

Why not just make your own growable vectors, then?  It will be just as
efficient.  Guile's hash tables are not designed to be addressed by
index.

I guess to summarize: if you want an abstraction like tables, you would
build it out of vectors and hash tables.  But vectors and hash tables
themselves are the lower-level building blocks.

>> Lua (and JS) implementations typically have many different
>> implementation strategies for their table-like objects.  For example,
>> V8 has over two dozen.
>
> Uh what?  Lua has one implementation "strategy".  Array part, and hash
> part.

LuaJIT doesn't pack unboxed numerics in the array part?  I would be
surprised.  I would also be surprised if it didn't do clever things in
the "properties" part, as V8 also does.

> There has been some sort of a language shootout on the LilyPond
> developer list.  With regard to the question Guile/Lua, my respective
> pro/contra list for suitability for extensions was [...]

Pretty good observations here.

Andy
-- 
http://wingolog.org/



reply via email to

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