Historically, most Lisp-family languages are case-insensitive for symbols. Scheme departed from this tradition since R6RS, and the symbols are read in case-sensitive way. (Note that symbols have been case-sensitive internally even in R5RS Scheme; case-insensitivity is about readers.)
Gauche reads and writes symbols in case-sensitive manner by default, too. However, to support legacy code, you can set the reader to case-insensitive mode, in the following ways:
#!fold-case
reader directiveWhen Gauche sees a token #!fold-case
during reading a program,
the reader switches to case-insensitive mode. A token
#!no-fold-case
has an opposite effect—to make the
reader case-sensitive. These tokens affect the port
from which they are read, and are in effect until EOF
or another instance of these tokens are read.
See Lexical structure for more details on #!
syntax.
This is the way defined in R6RS and R7RS.
-fcase-fold
command-line argumentAlternatively, you can give a command-line argument -fcase-fold
to the gosh
command (see Command-line options).
In this mode, the reader folds uppercase characters in symbols to lowercase
ones. If a symbol name contains uppercase characters, it is written
out using |-escape (see Symbols).