4 ms·
(symbol-access) reminds me of the property list feature [0] of Chez Scheme and other implementations (presumably R7RS as well), which allow arbitrary data to be
by jpt4 10y ago
(symbol-access) reminds me of the property list feature [0] of Chez Scheme and other implementations (presumably R7RS as well), which allow arbitrary data to be associated with any symbol "in the background" (as I visualize it). I've pondered using tags stored in the prop-list as a kind of poor man's run-time type system for polymorphic functions to check before performing the appropriate operation, but chose to use custom record types, which generate custom (is-type-x?) predicates, instead.
For the more knowledgeable, is (symbol-access) a complete general purpose primitive for reactive programming, like (delay) and (force) are for laziness?
[0] http://www.scheme.com/csug8/objects.html http://www.scheme.com/csug8/objects.html
- junke 10y agoSymbol property lists (like in CL: http://www.lispworks.com/documentation/lw70/CLHS/Body/t_symbol.htm http://www.lispworks.com/documentation/lw70/CLHS/Body/t_symb...) are useful, but you have to take care about the difference between symbols and variables. The same symbol in a different environment can represent a variable of a different type. Apparently symbol-access manipulates the current lexical environment, ie. a specific binding of particular symbol. > For the more knowledgeable, is (symbol-access) a complete general purpose primitive for reactive programming, like (delay) and (force) are for laziness? As far as I know, yes, but careful about mutual references: if updating x when y changes triggers another update of y from x, you might never terminate.