chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Adding a free slot to Chicken symbols


From: John
Subject: Re: [Chicken-users] Adding a free slot to Chicken symbols
Date: Sun, 02 Apr 2006 10:29:38 -0500
User-agent: Thunderbird 1.5 (X11/20060113)

Couldn't this be implemented as a global hash table, and not require any modification to Chicken's inner workings?

-- John

John Cowan wrote:
This is a feature request for Chicken.  It's hopefully very simple to
implement, and it will be extremely useful for me, but it's a fairly deep
change to the system, and it will have impact on people who don't use it.

I'd like to have an extra slot provided with each symbol that can contain
any Chicken object.  Two primitive procedures (I propose symbol-slot
and symbol-slot-set!) will provide read and write access to the slot.
This will be very useful for implementing true property lists in my Lisp
1.5 emulator and for other purposes in my Joy interpreter.

The cost is, of course, that each symbol becomes 4 bytes bigger, and most
people will have no use for this feature, so it will be pure overhead.
OTOH, most programs don't have zillions of symbols at run time, either,
so perhaps it's not that expensive.

Unfortunately, I don't know enough about the Chicken implementation to
propose a patch.





reply via email to

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