Re:Lisp, Smalltalk, and the power of symmetry (2014)
by rileyphone on Monday May 30, 2022 @02:21AM
(#31555970)
I agree my syntax is quite spartan, though that's because I don't intend to rely on it as the user interface, but would rather extend to structured editing more like Self.
On the laziness part I'm torn - quoting is what that amounts to and it never seemed extremely elegant either. The call site disambiguation is nice for knowing whether you can compile something.
I like your syntax, but wouldn't it be better as something like
or maybe: that little bit of extra punctuation (only needs to be a single character) is really helpful in making clear what is the field and what is the value. Syntactic minimalism is great, but sometimes it is taken a bit too far> Where here the $ in slot names means the corresponding value isn't evaluated
If parameters have type declarations, why not make laziness part of the type instead of part of the name?
I suppose it makes it clear at the invocation site that the parameter is lazy-evaluated. I wonder how important that is though? In Smalltalk, it is very clear, due to [] vs (). In most Lisps, you can't tell from the invocation site whether some symbol is an ordinary defun, or a special form or macro, you have to look up its definition or documentation. In my experience, that isn't a big problem – if you don't remember it, sooner or later you end up having to look it up anyway, to understand what the parameters mean and what it actually does.