Dear all,
I was fooling around with reader macros to implement some - let's say - "tuple" syntax.
Now, I am just curious about the general thinking on this.
First of all, let's note that the problem here in the conflating of the "constructor" with the "printed representation" of an item. I.e., in Matlab you say
>> [1, 2, 40 + 2]
ans =
1 2 42
In CL, doing the simple thing, you get
cl-prompt> [1 2 (+ 40 2)]
[1 2 42]
but
cl-prompt> #(1 2 (+ 40 2))
#(1 2 (+ 40 2))
So, suppose you have your [ … ] reader macro, would you have it work "functionally" or "quoting-ly" (for want of a better word)? I am curious. Note that the Matlab-style version would not break referential transparency if you did not have mutations.