[racket] Quoted expressions in #lang racket
20 minutes ago, Racket Noob wrote:
>
> Saying that (quote (1 2 3)) evaluates to (quote (1 2 3)) [instead to
> (1 2 3)] is the same nonsanse to me like saying that (+ 1 2)
> evaluates to (+ 1 2) [instead to 3].
Yet another view:
(+ 1 2) evaluates to 3 is nonsense, it really evaluates to three.
(+ 1 2) evaluates to 3 is nonsense, it really evaluates to "3".
(+ 1 2) evaluates to 3 is nonsense, it really evaluates to three.
(+ 1 2) evaluates to 3 is nonsense, it really evaluates to #b00000011.
(+ 1 2) evaluates to 3 is nonsense, it really evaluates to ^C.
...
All Schemes and Lisps evaluate (list 1 2 3) into the same list,
including Racket. It just gets *printed* in some form that is
intended for human consumption.
And BTW, the different printout is not a Racket invention -- it is
used in scheme48/scsh. Or in MIT Scheme the printout is something
like ";; value: (1 2 3)" and obviously the ";;" prefix is not part of
the value.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!