[armedbear-devel] debug assert considered bad for health

Alan Ruttenberg alanruttenberg at gmail.com
Thu May 6 16:32:14 UTC 2010


On Thursday, May 6, 2010, Ville Voutilainen <ville.voutilainen at gmail.com> wrote:
> On 6 May 2010 18:53, Alan Ruttenberg <alanruttenberg at gmail.com> wrote:
>>> Since Java doesn't have a standard macro facility or a concept like eval,
>>> I can't think of an wasy way to output the tested assertion without
>>> repeating the string twice (which tends to lead to errors in my experience).
>> My java buddy says use this facility:
>> http://java.sun.com/j2se/1.4.2/docs/guide/lang/assert.html
>
> That doesn't, unfortunately, solve the concern Mark states above. What we'd like
> to have is capability to say
> Assert((5 + 6 + 7) == 18);

well, having a look at the code, that wouldn't be that useful. In many
case some Boolean is computed and the assertion tests that Boolean.

I think it needs something more like a formatted message associated
with the failure.

-Alan

> and have that output the parameters in string form and as computed
> values as well.
> You can do something like that pretty easily with lisp, but not with java. ;)
>




More information about the armedbear-devel mailing list