guile-user
[Top][All Lists]
Advanced

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

Re: A couple of questions about goops method parameters


From: Marko Rauhamaa
Subject: Re: A couple of questions about goops method parameters
Date: Fri, 05 Sep 2014 23:51:02 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Panicz Maciej Godek <address@hidden>:

> 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



reply via email to

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