Which makes it useless here.
Daniel Hartwig <address@hidden
> On 11 June 2012 20:20, David Kastrup <address@hidden
>>> P.S.: I still need to look at vlists. They might already address this
>>> issue, though I can't use them in Guile 1.8.
>> No, the "immutable" angle would make them unsuitable again.
> Note that vlists are only immutable in the sense that you can not
> modify the value of a slot already allocated.
Wrong. My use case only _allocates_ at the end of the existing type
>> Scheme/Guile vectors are fixed size. Now I have a situation where I
>> have a basic type lattice with records stored in vectors, and this type
>> lattice may be extended dynamically (which typically happens at the
>> start of a whole file, for potentially multi-file runs).
> From this I gather that your use case only appends to the lattice, if
> so, vlist is suitable for that task.
lattice, but the records are not read-only.
A tiny step if you are modifying the C code. A not so tiny step if you
>> Cough, cough. Standard vectors are not growable. Which is the
>> original problem of this thread, never mind Lua.
> True, but a growable vector is a tiny step away from the standard
are working with Scheme.
But it is not standard for a growable vector that it only comes with
>> hashtables have additional indirection
>> through hash buckets and coalescing lists
> This is fairly standard for a hash table. I would be quite surprised
> if the hash table part of a Lua table did not also use buckets.
buckets and chains.
Except that vectors don't grow. Are you even reading what you are
>> Except that this one isn't.
> Why not?
> You take a vector and a hash table, store your values in them, and
> grow either as needed. This is not a complicated type.