home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / scheme / 2537 < prev    next >
Encoding:
Internet Message Format  |  1992-11-05  |  1.3 KB

  1. Path: sparky!uunet!gumby!yale!yale.edu!think.com!barmar
  2. From: barmar@think.com (Barry Margolin)
  3. Newsgroups: comp.lang.scheme
  4. Subject: Re: Code is not portable across case folding methods
  5. Date: 5 Nov 1992 18:48:48 GMT
  6. Organization: Thinking Machines Corporation, Cambridge MA, USA
  7. Lines: 22
  8. Message-ID: <1dbqagINN7a2@early-bird.think.com>
  9. References: <3432@mitech.com> <PK.92Nov5142038@talitiainen.cs.tut.fi>
  10. NNTP-Posting-Host: telecaster.think.com
  11.  
  12. In article <PK.92Nov5142038@talitiainen.cs.tut.fi> pk@cs.tut.fi (Kellom{ki Pertti) writes:
  13. >I have run into this, but in a different way: I have a Scheme reader
  14. >that reads Scheme expressions, and returns a data structure that is
  15. >basically the s-expression with information about where in the source
  16. >file the expression was. The reader uses string->symbol to make a
  17. >symbol out of the string it has read, but for example in sci I get
  18. >
  19. >  (string->symbol "define") => \d\e\f\i\n\e
  20.  
  21. This is not the only problem with trying to use string->symbol for this.
  22. Consider:
  23.  
  24. (string->symbol "\#f") -> \\\#f
  25.  
  26. when it should result in \#f.  Unless you're prepared to emulate all the
  27. features of the reader prior to calling string->symbol, you can lose
  28. lose.  This is why Common Lisp has READ-FROM-STRING.
  29. -- 
  30. Barry Margolin
  31. System Manager, Thinking Machines Corp.
  32.  
  33. barmar@think.com          {uunet,harvard}!think!barmar
  34.