Hacker News new | past | comments | ask | show | jobs | submit login

In a Lisp implementation, I could use unique, zero sized objects to implement symbols. The gensym function would create a new one.

Zero-sized distinguishable objects can have properties attached to them via hashes. At the API level, you cannot tell how a property (e.g. symbol-name) is attached to an object.

Properties, like the symbol name, would be attached to these objects via hashes.

It's not an ideal representation for symbols when all symbols have a certain property, like name.

If you have objects such that they have certain properties, but the properties are rare (only a few objects have a value of the property that requires storing space, and for the rest it is some "undefined" value, you can achieve a sparse representation by making the objects as small as possible, attaching the properties externally.






Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: