[procedure] keyword? obj

SRFI-88, Chicken, STk, STklos, Gauche, Bigloo, Kawa

See also #:, keyword->string, string->keyword.

Keyword syntax variations

There are several variations in the literal keyword syntax. See the discussion thread on SRFI-88 for different views.

Prefix colon

Like :foo. This syntax makes keywords look like Common Lisp's. The disadvantage is that there are existing code that uses colon-prefixed symbols (SRFI-42). Implementations using this syntax must have special handling in such code.

Implementations: Gauche, STk, STklos (also accepts postfix colon), Bigloo(also accepts postfix colon), Guile (by a reader option).

Prefix hash-colon

Like #:foo. This syntax does not conflict with existing symbols. But some implementations use this syntax for uninterned symbols, a la Common Lisp.

Implementations: Guile, Chicken(also accepts postfix colon).

Postfix colon

Like foo:. This also overlaps with valid symbol syntax, but it's less likely to conflict with existing code.

Implementations: DSSSL?, Kawa, SRFI-88, STklos (also accepts prefix colon), Bigloo(also accepts prefix colon), Chicken(also accepts prefix hash-colon).

Note: in Kawa, a colon in identifier foo:bar is read as ($lookup$ foo 'bar), and the keyword is just a special case of it.