Richard Fateman wrote:
> Raymond Toy wrote:
>
>>
>> I haven't been following this discussion too closely, but how is
>> noobject(gensym) any better than just signaling an error? How does %o25
>> help the user in any way? Can you do anything useful with such a
>> result? Can you tell how noobject(?g24196) came about? (Well, in a
>> non-trivial example. This example is pretty clear where each noobject
>> came from.)
>>
>>
> 1. There is really no need for a gensym. There could simply be an
> array of noobjects.
> E.g. NoObject[45], NoObject[46], ....
>
This seems much better than a gensym.
> 2. What can be done with this?
> Well, we can also produce
> Diagnosis[45]: "The integral integrate(......) is divergent"
> Diagnosis[46]: "Division by zero in function foo()"
> etc
>
This seems nice. But what would be nicer than having the program stop
(as we can with Maxima) exactly at the point of the error so we can
debug it? After all, we could have a complicated function foo that
causes division by zero in many places. I'd like to see it stop when we
get there.
> I have a paper on using NaNs for diagnostic information like this using
> a hash table.
>
Can you send me a pointer to that?
>
>> Back when I used to run Fortran simulations, I sometimes would get cool
>> results like NaN for all of my expected output. It's nice that it
>> didn't crash, but getting NaN for an answer was pretty useless to me.
>>
>>
> That's because Fortran support systems were bad, and didn't use NaNs for
> diagnosis.
>
I don't know of any system that actually encodes such info. But it's
an interesting idea.
> Note that there is not just one NaN. In double precision you have
> something like 2^51 different NaNs
> so your Fortran system could have (for example) recorded the program
> counter where the NaN was
> produced. Or something else useful.
> Also, of course, Fortran would have to be run interactively so you could
> interact with the debugging/diagnosis
> system.
>
>
Yes, of course. That's why I use Lisp a lot more these days when I can. :-)
Ray