[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: snmpconf PM: Integer NaN?

At 04:24 PM 3/15/2001 -0800, Steve Waldbusser wrote:

>Another angle on this decision is that by gaining the flexibility
>to detect errors after the fact and correct them, you lose the
>flexibility to *skip* error detection (unless you're willing
>to throw correctness out the window).

If I understand you correctly, this is the nub of my objection. I suspect 
that *most* scripts can handle a run-time exception as a default error 
handling. If the programmer wants to take error handling into his/her own 
hands, IsValidInteger() provides the flexibility to do so.  NaN, however 
*requires* that the programmer do the error checking, or else errors will 
never be detected.

> > While I will happily argue the utility of the NaN concept,
> > unless there are more cases where NaNs can enter the system,
> > I don't think the additional utility will not make up for the cost.
>No, there are no other cases.
>Personally I'm leaning towards no NaN as well. Does anyone see cases
>where the taint value would simplify scripts?

I'm sure we could come up with some, but I think there are more cases where 
the errors-cause-abort model would simplify scripts.

- Pablo
Pablo Halpern                                    phalpern@newview.org