[plt-scheme] Re: macros and eval
I used eval for test suites on the correct production of syntax error
messages by my macros and catching the syntax error in order that more tests
can follow.
Of course the testing macro can test itself too. But nowadays I use a
testing system without eval, because that allows me access to the local
environment when a test is made at module top level or in a local scope. It
no longer can test the correct handling of syntax errors. It's taking or
leaving, I guess. BTW, is there somewhere else a testing system that:
1) tests produced values, multiple values included.
2) tests produced standard output.
3) tests the correct production of error messages, those of syntax errors
included.
4) and can be called from whereever you may want to without losing the local
environment.
????
Jos
----- Original Message -----
From: "Jakub Piotr Cłapa" <jpc-ml at zenburn.net>
To: "PLT-list" <plt-scheme at list.cs.brown.edu>
Sent: Sunday, March 16, 2008 8:30 PM
Subject: Re: [plt-scheme] Re: macros and eval
> Grant Rettke wrote:
>> I've never used eval for anything, so I haven't got sense of when you
>> would use it.
>
> As somebody already mentioned eval is only really needed when you want to
> (surprise, surprise!) eval code at runtime. Like loading scripts from an
> external file or implementing a repl.
>
> --
> regards,
> Jakub Piotr Cłapa
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme