|
Re: error or warning during compilation, yet some function is generat ed: msg#00140lisp.clisp.general
> * In message <16048.15.502758.29150@xxxxxxxxxxxxxxxx> > * On the subject of "Re: [clisp-list] error or warning during compilation, > yet some function is generat ed" > * Sent on Wed, 30 Apr 2003 18:55:43 +0200 (CEST) > * Honorable Bruno Haible <haible@xxxxxxx> writes: > > Sam writes: > > > > ; I.e. an error is reported, yet compilation continues, and returns a > > > weird function object: > > > > this appears to be the intended behavior in COMPILE-LAMBDA > > (compiler.lisp) > > I can easily disable it, but I would love to hear why Bruno introduced it. > > I don't see a good reason anymore not to give an > (sys::error-of-type 'sys::source-program-error ...) either this or just return nil, like we do now in other cases: [1]> (defun f () (let ((:f 0)) :f)) F [2]> (compile 'f) ERROR in F : Constant :F cannot be bound. NIL ; 1 ; 1 [3]> (setq f (lambda () (let ((:f 0)) :f))) #<CLOSURE :LAMBDA NIL (LET ((:F 0)) :F)> [6]> (compile nil f) ERROR : Constant :F cannot be bound. NIL ; 1 ; 1 returning NIL would violate the rule that (lambda ...) returns a function, so, I guess, an error is better. -- Sam Steingold (http://www.podval.org/~sds) running RedHat9 GNU/Linux <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/> <http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html> There is an exception to every rule, including this one. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: error or warning during compilation, yet some function is generat ed: 00140, Bruno Haible |
|---|---|
| Next by Date: | screen package: 00140, Don Cohen |
| Previous by Thread: | Re: error or warning during compilation, yet some function is generat edi: 00140, Bruno Haible |
| Next by Thread: | screen package: 00140, Don Cohen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |