Hi!
I just found out that their are the ##table-foldl and ##table-for-each internal procedure that are actually essential for making a program that use table efficient, but why are these only internals, and not external functions?
I would have really liked to know about these before now! hehe
Thanks
David
Afficher les réponses par date
Date: Fri, 31 Oct 2008 15:33:05 -0400 From: David St-Hilaire sthilaid@iro.umontreal.ca
I just found out that their are the ##table-foldl and ##table-for-each internal procedure that are actually essential for making a program that use table efficient, but why are these only internals, and not external functions?
I'd wager a guess that they are unsafe, not merely in that they don't check their arguments but also in that they don't behave nicely when the procedures passed to them modify the table.
Taylor R Campbell wrote:
that they don't behave nicely when the procedures passed to them modify the table.
Is there an efficient algorithm around that problem (i.e. short of copying the whole table or their keys at once first)?
Anyway, the same problem holds true for example for Perl's hash table iterators. It's just one of the caveats one has to know about.
Btw, there is at least a |table-for-each| procedure already, and documented in the Gambit docs. Actually it is even more restrictive than just explicit modification. (Wondering why, no time to check now.)
Christian.