Since ' expands to quote, '#(1 xyz) is really just shorthand for (quote (1 xyz)). Note that quote recursively quotes its arguments; for the same reason that '(a b) is a list that contains the *symbols* 'a and 'b, '#(1 xyz) is a vector that contains 1 and the symbol 'xyz.
On Mon, Oct 13, 2014 at 11:53 AM, Christian Wagenknecht < [email protected]> 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? > > > ____________________ > Racket Users list: > http://lists.racket-lang.org/users > >
____________________ Racket Users list: http://lists.racket-lang.org/users

