Keyword (computer programming): Difference between revisions

Content deleted Content added
Clarifying that in Lisp, the term "keyword" is used to describe a different thing, not that the same thing described previously (keywords) is different in Lisp.
Changing "quoting" link to point to the Lisp page, as the previous link was to a disambiguation page that wasn't useful for this usage of "quoting."
Line 5:
Some languages, such as [[PostScript]], are extremely liberal in this approach, allowing core keywords to be redefined for specific purposes.
 
In [[Common Lisp]], the term "keyword" (or "keyword symbol") is used for a special sort of symbol, or identifier. Unlike other symbols, which usually stand for variables or functions, keywords are self-[[Lisp (programming language)#Self-evaluating forms and quoting|quoting]] and evaluate to themselves. Keywords are usually used to label named arguments to functions, and to represent symbolic values.
 
Languages vary as to what is provided as a keyword and what is a [[library routine]]. Some languages, for instance, provide keywords for input/output operations whereas in others these are library routines. In [[Python (programming language)|Python]] and many [[BASIC]] dialects, <code>print</code> is a keyword. In contrast, the C and Lisp equivalents <code>printf</code> and <code>format</code> are functions in the standard library.