Hi David,

You raise an interesting issue.  But first, a nitpick :)

On Sat 09 Jun 2012 14:32, David Kastrup <d...@gnu.org> writes:

> Scheme hashtable

To be very pedantic, there are no hashtables in R5RS Scheme.  SRFI-69
and R6RS specify them (in different ways), but do not mandate that they
grow.  Guile's do grow, but that's a detail.

The underlying message important:  _Scheme_ doesn't give you much in the
way of data structures.  It does give you some good tools to define new
data structures, though.

Guile (as an implementation) also provides a few data structures
built-in.  It could provide more.

But, I don't think that "table" is the right strategy for what you want.

Lua (and JS) implementations typically have many different
implementation strategies for their table-like objects.  For example, V8
has over two dozen.  I don't think we want to pull all that complexity
into the core of Guile where it's not necessary for idiomatic Guile
programming.  It would certainly exist in the language-specific runtime,
though.  Perhaps a module would be more appropriate, though whether
something that fundamental could be shared between any two languages is
tricky.

You might enjoy
http://blog.mrale.ph/post/24351748336/explaining-js-vm-in-js.

For your particular problem, I would just define a new data type,
<growable-vector> or so, perhaps using srfi-9.

Regards,

Andy
-- 
http://wingolog.org/

Reply via email to