Panicz Maciej Godek <godek.mac...@gmail.com>: > There are other representations (like basket list or assoc list) that > avoid that problem, but they generate other ones -- namely, that the > access times get linear, and in case of assoc lists there is a huge > overhead of data, and in case of basket lists one needs to pass around > additional information regarding the names of subsequent fields.
Dynamic programming languages lack a true, efficient dot notation. That's a price I'm willing to pay (especially since Guile allows me to switch to C where necessary). For example, Python and JavaScript translate x.f into a hash table lookup. In my tests, Guile's alists are more efficient than hash tables up to maybe a hundred elements or so (IIRC). That's why I switched to alists in my tiny object system. As for the data overhead, I haven't yet really run into that problem. Again, high memory use is a common issue with dynamic programming languages. Python's objects are quite sizable as well. Marko