Keywords are similar to symbols. They are used mainly for specifying keyword arguments.
Historically keywords have been self-evaluating (you did not need to quote them). This is changing: you should quote a keyword if you want a literal keyword value, and not quote it if it is used with a keyword argument. (This change is a work-in-progress.)
The two syntaxes have the same meaning: The former is nicer-looking;
the latter is more portable (and required if you use the
--r7rs command-line flag).
Details: In r7rs and other Scheme standards the colon character does not have any special meaning, so
foo:barare just regular identifiers. Therefore some other Scheme variants that have keywords (including Guile and Racket) use the
#:syntax. Kawa has some hacks so that most standard Scheme programs that have colons in identifiers will work. However, for best compatibility, use the
--r7rscommand-line flag (which turns colon into a regular character in a symbol), and the
A keyword is a single token; therefore no whitespace is allowed between
identifier and the colon or after the
these characters are not considered part of the name of the keyword.
objis a keyword, and otherwise returns
Returns the name of
keywordas a string. The name does not include the final
Returns the keyword whose name is
stringdoes not include a final