3 ms·
Strings in Lisp are surrounded with double quotes. In this case, 'English is not a string, but a symbol. Symbols are arbitrary flags with readable names. There
by vvillena 6y ago
Strings in Lisp are surrounded with double quotes. In this case, 'English is not a string, but a symbol. Symbols are arbitrary flags with readable names.
There are lots of languages with symbols. Some of them even use the same syntax, like Scala (symbol usage in Scala is uncommon, though). However, the most prominent non-Lisp language that uses symbols all the time is probably Ruby.
- kazinator 6y agoWell, rather, english is not a string, but a symbol. Because symbols denote variable names in Lisp code, the expression english calls for the value of english. If we want the value of the expression to be the english symbol object itself, we need (quote english). Because that is too verbose for a language in which symbolic processing is prime time, there is a shorthand prefix notation for it, 'english.
- lispm 6y ago> 'English is not a string, but a symbol 'ENGLISH is not a symbol, it's actually a shorter notation for the list (QUOTE ENGLISH). But it evaluates to a symbol: ENGLISH