home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.scheme
- Path: sparky!uunet!mcsun!news.funet.fi!tut!pk
- From: pk@cs.tut.fi (Kellom{ki Pertti)
- Subject: Re: wots going on here!?
- In-Reply-To: bh@anarres.CS.Berkeley.EDU's message of 1 Sep 1992 04: 20:08 GMT
- Message-ID: <PK.92Sep1103442@talitiainen.cs.tut.fi>
- Sender: usenet@funet.fi (#Kotilo NEWS system )
- Nntp-Posting-Host: talitiainen.cs.tut.fi
- Organization: Tampere Univ. of Technology, Finland.
- References: <17timvINN7b8@agate.berkeley.edu> <17tn1uINNkij@early-bird.think.com>
- <JINX.92Aug31170432@chamarti.ai.mit.edu>
- <17ur1oINNem6@agate.berkeley.edu>
- Date: Tue, 1 Sep 1992 08:34:42 GMT
- Lines: 35
-
- In article <17ur1oINNem6@agate.berkeley.edu> bh@anarres.CS.Berkeley.EDU (Brian Harvey) writes:
- But the *really* right error message would be something like
- "IF didn't return a value" (or COND didn't, or whatever it is).
- The fact that the non-value was used in function position isn't
- really what's wrong in this situation.
-
- The interpreter (or compiled code for that matter) may not have the
- faintest idea where the undefined value came from, because it may have
- passed thru many procedure calls. What we really need is a Scheme lint
- that would tell the user that he/she is using a value that may be
- undefined. Undefinedness (sp?) should be a lot easier to to check than
- general type inference, because it is contagious in the same way as
- inexactness.
-
- I am currently writing a lint for Scheme, but I can not devote very
- much time to it. I am planning on using it in my courses in order to
- get rid of code like
-
- (define (foo x)
- (define bar 0)
- (define baz 0)
- (set! bar 10)
- ...)
-
- that students sometimes write. I will say that I do not accept code
- if lint complains about it, unless the student can convince me that
- there really is no other option. If anyone has any code that analyzes
- Scheme programs, I'd be more than happy to look at it.
- --
- 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)
-
-
- --
-