3 ms·
Destructive modification of literal objects is one of those things you're not supposed to do because the consequences are undefined [0]. Some CL implementations
by dreamcompiler 6y ago
Destructive modification of literal objects is one of those things you're not supposed to do because the consequences are undefined [0]. Some CL implementations might let you get away with it; others might not. I agree that it would be better if immutability was required for literals.
[0] http://www.lispworks.com/documentation/HyperSpec/Body/03_abac.htm http://www.lispworks.com/documentation/HyperSpec/Body/03_aba...
- blacktriangle 6y agoNice link. I'd be happy if an implementation just turned that into a compiler error. I can see use cases for reaching in and mutating like that, but also seems like dynamic scope is a better solution for when you want that kind of action at a distance.