[Ecls-list] unbound-variable handler

Dean O'Connor dean.oconnor at ite.com.au
Mon Jun 25 06:48:57 UTC 2007


Sure this has potential to cause difficult to debug problems depending 
on the application, but "grave bug" is a bit subjective.
Other scripting languages like Perl allow this by default.

We have created a DSL  (using Lisp) that even non-programmers (sales :) 
can use to write financial mapping rules.
We encourage them to initialise everything but the production Lisp 
engine (in-house based on elisp I think) allows NIL to be returned for 
references of vars that weren't declared.
There are lots of client scripts out there (working fine), so we can't 
just change the handling now.

We are trying to create an offline script engine that we can run the 
scripts through for testing before using the online system. ie. a test 
harness simulation.
So I need to replicate the online script engine identically.
Sure I could do them a favour and pick up any undeclared variables - and 
I agree that would be a good thing.
But at least for an adoption period, I need it to be optional and off by 
default.

I have been using ECL because at one stage we were going to replace the 
in-house engine with it. That fell through for now, but I am quite used 
to it now (and liked its compact size).
The in-house Lisp engine is case-sensitive, whereas it seems ECL can't 
be at the moment.

I just tried CLISP and it can handle the unbound-variable to NIL (as 
shown by Dustin), allows for case-sensitivity and error reporting seems 
better. So I guess I'll go with that for now.
In fact, I was surprised how easy it was to port my app from ECL to 
CLISP. Guess that's a testimony to CL.

cheers
deano

Pierre THIERRY wrote:
> Scribit Dean O'Connor dies 25/06/2007 hora 01:45:
>   
>> any other ideas to get around this? I really need a way of
>> assigning/returning NIL to unbound variables and continuing execution.
>>     
>
> Like I said, in most cases it's a grave bug you should fix. Could you
> tell us more why you can't fix it?
>
> Curiously,
> Pierre
>   
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ecls-list mailing list
> Ecls-list at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ecls-list
>   




More information about the ecl-devel mailing list