Re:Lisp, Smalltalk, and the power of symmetry (2014)
by mpweiher on Tuesday May 31, 2022 @11:23AM
(#31570596)
> and they don't have any kind of "class slot"
Yeah, that really sucks. Objective-S's object literals do. Otherwise they really wouldn't be object literals, would they?
It was really an accident, because Smalltalk's literal arrays use #(), and since I wanted to have dictionary literals use the basic same look, I chose #{}. And also I use {} for blocks and block structure, rather than []. Well, it turns out you can tuck a name between the # and the {}. Yay! Classes. And thus objects!
EDIT:
Just saw that edn uses a very similar mechanism. Neat!
Yeah, that really sucks. Objective-S's object literals do. Otherwise they really wouldn't be object literals, would they?
It was really an accident, because Smalltalk's literal arrays use #(), and since I wanted to have dictionary literals use the basic same look, I chose #{}. And also I use {} for blocks and block structure, rather than []. Well, it turns out you can tuck a name between the # and the {}. Yay! Classes. And thus objects!
EDIT:
Just saw that edn uses a very similar mechanism. Neat!