Re: Python syntax in Lisp and Scheme
"Peter Seibel" <peter@javamonk ey.com> wrote in message
news:m34qyfibc8 .fsf@javamonkey .com...[color=blue]
> Note that it's the ability, at macro expansion time, to treat the[/color]
code[color=blue]
> as data that allows me to generate test failure messages that[/color]
contain[color=blue]
> the literal code of the test case *and* the value that it evaluated
> to. I could certainly write a HOF version of CHECK that accepts a[/color]
list[color=blue]
>of test-case-functions:[/color]
....[color=blue]
> But since each test case would be an opaque function object by the
> time CHECK sees it, there'd be no good option for nice reporting[/color]
from[color=blue]
> the test framework.[/color]
But can't you explicitly quote the test cases for input to the HOF and
eval them within the HOF, so you again have both the literal code and
value generated? Not as pretty, admittedly, and perhaps less
efficient, but workable?
Terry J. Reedy
"Peter Seibel" <peter@javamonk ey.com> wrote in message
news:m34qyfibc8 .fsf@javamonkey .com...[color=blue]
> Note that it's the ability, at macro expansion time, to treat the[/color]
code[color=blue]
> as data that allows me to generate test failure messages that[/color]
contain[color=blue]
> the literal code of the test case *and* the value that it evaluated
> to. I could certainly write a HOF version of CHECK that accepts a[/color]
list[color=blue]
>of test-case-functions:[/color]
....[color=blue]
> But since each test case would be an opaque function object by the
> time CHECK sees it, there'd be no good option for nice reporting[/color]
from[color=blue]
> the test framework.[/color]
But can't you explicitly quote the test cases for input to the HOF and
eval them within the HOF, so you again have both the literal code and
value generated? Not as pretty, admittedly, and perhaps less
efficient, but workable?
Terry J. Reedy
Comment