Arc Forumnew | comments | leaders | submitlogin
Rntz: Not everything is an expression (rntz.net)
4 points by akkartik 24 days ago | 1 comment




3 points by waterhouse 23 days ago | link

The article uses patterns as an example of a non-expression syntax. Another would be what might be called access expressions that setf can use. And CL does have defsetf (as well as define-modify-macro and such) to extend it (as does Arc with = and defset).

Note that I say "access expression", though—it's designed such that (setf (car x) ...) will modify what (car x) subsequently would return (assuming that "..." doesn't rebind x). But there's also a symmetry in the pattern-matching stuff: if (cons x y) created an object, then the pattern (cons x y) will destructure the object and bind x and y to what they originally were. Perhaps that's simply good practice in designing new syntaxes.

reply