[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inconsistencies
From: |
Martin Grabmueller |
Subject: |
Re: Inconsistencies |
Date: |
Thu, 15 Mar 2001 18:20:48 +0100 |
> From: Gary Benson <address@hidden>
> Date: Thu, 15 Mar 2001 15:15:42 +0000 (GMT)
>
> Teach Yourself Scheme in Fixnum Days says:
>
> | Scheme symbols are normally case-insensitive. Thus the symbols Calorie and
> | calorie are identical:
> |
> | (eqv? 'Calorie 'calorie)
> | => #t
According to R5RS, the case of symbols does not matter, so `TYSIFD' is
right. Guile (and some other Scheme implementations) do read symbols
case sensitively, though, by default. I think this is because most
people are used to case-sensitive variable names when they come from
other languages.
> Guile says:
>
> | guile> (eqv? 'Calorie 'calorie)
> | #f
> | guile> (eqv? 'calorie 'calorie)
> | #t
You can change Guile's behaviour by switching case-insensitive reading
on like this:
guile> (eqv? 'Calorie 'calorie)
#f
guile> (read-enable 'case-insensitive)
(keywords #f case-insensitive positions)
guile> (eqv? 'Calorie 'calorie)
#t
Note that in most programs this is not a problem, because most Scheme
programmers never use upper-case letters anyway.
Regards,
'martin
- Inconsistencies, Gary Benson, 2001/03/15
- Re: Inconsistencies,
Martin Grabmueller <=