3 ms·
I've never seen any references to any Lisp work without symbol interning. I suspect MacCarthy had this idea before any code had been written. I also suspect th
by kazinator 6y ago
I've never seen any references to any Lisp work without symbol interning. I suspect MacCarthy had this idea before any code had been written.
I also suspect that property lists came into being organically as part of incremental development, as follows.
Initially, symbols would have had some built-in storage fields, such as a place to store a function or value.
As development went on, the researchers wanted to attach more information to symbols pervasively. In the system itself, they waned to indicate whether a function is in machine language or in Lisp. Plus, likely, there were situations in which it was desirable to attach application-specific data to a symbol (that is not simply its value).
At that point, the idea would have been obvious: let's not make symbols any larger with more fixed fields that waste memory, in order to represent rare properties that only a subset of the symbols have. Let's attach a dynamic list to them with variable properties. Since not all symbols have all properties, the properties cannot have fixed positions in these lists, which requires associative lookup. A symbol with no properties at all wastes only one storage cell to represent the empty list, which is the last such cost that has to be paid to support any number of properties.
- peter_d_sherman 6y agoMakes sense!