home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gumby!yale!yale.edu!think.com!barmar
- From: barmar@think.com (Barry Margolin)
- Newsgroups: comp.lang.scheme
- Subject: Re: Code is not portable across case folding methods
- Date: 5 Nov 1992 18:48:48 GMT
- Organization: Thinking Machines Corporation, Cambridge MA, USA
- Lines: 22
- Message-ID: <1dbqagINN7a2@early-bird.think.com>
- References: <3432@mitech.com> <PK.92Nov5142038@talitiainen.cs.tut.fi>
- NNTP-Posting-Host: telecaster.think.com
-
- In article <PK.92Nov5142038@talitiainen.cs.tut.fi> pk@cs.tut.fi (Kellom{ki Pertti) writes:
- >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
-
- This is not the only problem with trying to use string->symbol for this.
- Consider:
-
- (string->symbol "\#f") -> \\\#f
-
- when it should result in \#f. Unless you're prepared to emulate all the
- features of the reader prior to calling string->symbol, you can lose
- lose. This is why Common Lisp has READ-FROM-STRING.
- --
- Barry Margolin
- System Manager, Thinking Machines Corp.
-
- barmar@think.com {uunet,harvard}!think!barmar
-