Hi Jon,

> In the PicoLisp docs on the 'let' function I read that "It is an
> error condition to pass NIL as a sym argument." Is this really so? I
> have tried a few variants, like (let (NIL 1 X 2) X), but I have not
> "succeeded" in getting an error reaction ...

Yes, that's the point. The docu says that it is an error _because_ the
runtime system doesn't signal an error. All those special symbols (e.g.
also 'T') are not checked for performance reasons.

For that reason, it is strongly recommended to use 'lint' (or 'lintAll'
to check your whole program), to detect such "static" errors:

   : (de foo (R S T)
      (let NIL 7   
         (bar) ) )
   -> foo

   : (lint 'foo)   
   -> ((var NIL T) (def bar))

Agreed, the 'lint' output is rather cryptic ;-) It was inteneded to be
further processed by higher-level tools.

An additional note: Binding 'T' or 'NIL' to values as in the above
examples is not strictly an error, but produces probably unexpected

- Alex
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to