home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!unipalm!uknet!mcsun!news.funet.fi!news.cs.tut.fi!tut!pk
- From: pk@cs.tut.fi (Kellom{ki Pertti)
- Newsgroups: comp.lang.scheme
- Subject: Re: Code is not portable across case folding methods
- Message-ID: <PK.92Nov5142038@talitiainen.cs.tut.fi>
- Date: 5 Nov 92 14:20:38 GMT
- References: <3432@mitech.com>
- Organization: Tampere Univ. of Technology, Finland.
- Lines: 30
- NNTP-Posting-Host: talitiainen.cs.tut.fi
- In-reply-to: gjc@mitech.com's message of 4 Nov 92 18:19:55 GMT
-
- In article <3432@mitech.com> gjc@mitech.com (George J. Carrette) writes:
- I hate to say it guys, but this is already enough
- freedom to blow away code portability, as long
- as a program can call READ at runtime.
-
- I have run into this, but in a different way: I have a Scheme reader
- that reads Scheme expressions, and returns a data structure that is
- basically the s-expression with information about where in the source
- file the expression was. The reader uses string->symbol to make a
- symbol out of the string it has read, but for example in sci I get
-
- (string->symbol "define") => \d\e\f\i\n\e
-
- So, I must prepare for different preferred cases with a kludge (IMHO):
-
- ;;;
- ;;; Are symbols converted to upper case, lower case or not converted?
- ;;;
-
- (define *psd-preferred-case*
- (cond ((string=? (symbol->string 'Foo) "foo")
- 'lowercase)
- ((string=? (symbol->string 'Foo) "FOO")
- 'uppercase)
- (else 'original-case)))
-
- --
- Pertti Kellom\"aki (TeX format) # These opinions are mine,
- Tampere Univ. of TeXnology # ALL MINE !
- Software Systems Lab # (but go ahead and use them, if you like)
-