[racket] Quoted expressions in #lang racket

From: Racket Noob (racketnoob at hotmail.com)
Date: Sun Sep 18 13:02:30 EDT 2011

Sorry Shriram, i didn't mean to insult you or anyone else, but my poor english prevents me to express myself clearly. Still, i will try to explain what bothers me with the way Racket prints quoted expressions and I hope that you'll understand what i want to say:
Suppose that we enter expression (quote (1 2 3)) in REPL. Let's see what's happen next: 1) Lisp reader reads what we entered and converts it to his own internal representation of list. That list it passes to evaluator. 2) Evaluator analyse given list and recognize that it contains a symbol quote at its first position, which is signal to lisp that it shoud return its (only) parameter untouched. So, evaluator does just that: as result of evaluation, it returns a list (1 2 3). Hence, I think it would be reasonable that REPL print back just that, (1 2 3), as in CL or Clojure, and not '(1 2 3) as in Racket, because quote is already "consumed" in step 2) when evaluator "eats" it while processed the quote special form. For me, it's just plain wrong to print '(1 2 3) because quote is already gone.
> From: sk at cs.brown.edu
> Date: Sun, 18 Sep 2011 12:22:27 -0400
> Subject: Re: [racket] Quoted expressions in #lang racket
> To: racketnoob at hotmail.com
> CC: users at racket-lang.org
> I used different words than Matthias because we were trying to offer
> somewhat different explanations of what is happening.  You chose to
> use his words in response to mine, which only confuses things further.
> (There is, incidentally, a good reason why (+ 1 2) could, but does
> not, evaluate to (+ 1 2).)
> But overall, since I appear to be talking nonsense, I'll avoid
> following-up and aggravating you further.  Good luck.
> Shriram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110918/db182c12/attachment.html>

Posted on the users mailing list.