[racket] problems with the term 'symbol'

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Mon Oct 13 13:06:29 EDT 2014

On Mon, Oct 13, 2014 at 11:55 AM, Matthias Felleisen
<matthias at ccs.neu.edu> wrote:
>
> On Oct 13, 2014, at 11:53 AM, Christian Wagenknecht <c.wagenknecht at hszg.de> wrote:
>
>> With regard of Racket's symbols I have a problem with the consistency of the terminology as follows.
>> A symbol in Scheme and maybe in earlier Racket versions is considered as an identifier. For example xyz is a symbol, whereas 'xyz avoids the evaluation of xyz.
>>
>> In current version the little ' (normally as shorthand for quote) belongs to the symbol. For example 'xyz is a symbol. A symbol is obviously considered as a quoted identifier, at least syntactically.
>>
>> However, when using a symbol as part of an expression the prepending ' disappears. For example: (vector 1 'xyz), consisting of a number and a symbol evaluates to '#(1 xyz). But xyz is not a symbol but an identifier. Therefore to say that this vector belongs of a number and a symbol is no longer valid. (vector-ref '#(1 xyz) 1) returns 'xyz, which is correct, however, this is also visually a difference where there is none.
>>
>> Could you help me to get it right, please?
>
>
> You need to distinguish to what an evaluation evaluates (a value) and how the value prints. These are separate concerns and the Lisp/Scheme community suffered from a conflation for decades; Brian Smith's treatise on 2Lisp and 3Lisp was the worst form of this suffering.

The quote is there -- it is on the outside. These two printed forms:

  (vector 'x 'y)

  '#(x y)

are the same value.

Robby


Posted on the users mailing list.