home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / scheme / 2128 < prev    next >
Encoding:
Text File  |  1992-08-31  |  2.1 KB  |  51 lines

  1. Newsgroups: comp.lang.scheme
  2. Path: sparky!uunet!mcsun!news.funet.fi!tut!pk
  3. From: pk@cs.tut.fi (Kellom{ki Pertti)
  4. Subject: Re: wots going on here!?
  5. In-Reply-To: bh@anarres.CS.Berkeley.EDU's message of 1 Sep 1992 04: 20:08 GMT
  6. Message-ID: <PK.92Sep1103442@talitiainen.cs.tut.fi>
  7. Sender: usenet@funet.fi (#Kotilo NEWS system )
  8. Nntp-Posting-Host: talitiainen.cs.tut.fi
  9. Organization: Tampere Univ. of Technology, Finland.
  10. References: <17timvINN7b8@agate.berkeley.edu> <17tn1uINNkij@early-bird.think.com>
  11.     <JINX.92Aug31170432@chamarti.ai.mit.edu>
  12.     <17ur1oINNem6@agate.berkeley.edu>
  13. Date: Tue, 1 Sep 1992 08:34:42 GMT
  14. Lines: 35
  15.  
  16. In article <17ur1oINNem6@agate.berkeley.edu> bh@anarres.CS.Berkeley.EDU (Brian Harvey) writes:
  17.    But the *really* right error message would be something like
  18.    "IF didn't return a value" (or COND didn't, or whatever it is).
  19.    The fact that the non-value was used in function position isn't
  20.    really what's wrong in this situation.
  21.  
  22. The interpreter (or compiled code for that matter) may not have the
  23. faintest idea where the undefined value came from, because it may have
  24. passed thru many procedure calls. What we really need is a Scheme lint
  25. that would tell the user that he/she is using a value that may be
  26. undefined. Undefinedness (sp?) should be a lot easier to to check than
  27. general type inference, because it is contagious in the same way as
  28. inexactness. 
  29.  
  30. I am currently writing a lint for Scheme, but I can not devote very
  31. much time to it. I am planning on using it in my courses in order to
  32. get rid of code like
  33.  
  34.   (define (foo x)
  35.     (define bar 0)
  36.     (define baz 0)
  37.     (set! bar 10)
  38.     ...)
  39.  
  40. that students sometimes write. I will say that I do not accept code
  41. if lint complains about it, unless the student can convince me that
  42. there really is no other option. If anyone has any code that analyzes
  43. Scheme programs, I'd be more than happy to look at it.
  44. --
  45. Pertti Kellom\"aki (TeX format)  #       These opinions are mine, 
  46.   Tampere Univ. of TeXnology     #              ALL MINE !
  47.       Software Systems Lab       #  (but go ahead and use them, if you like)
  48.  
  49.  
  50. -- 
  51.