At 9:22 PM -0700 5/16/02, Brent Dax wrote:
>Dan Sugalski:
># At 5:28 PM -0700 5/16/02, Brent Dax wrote:
># >Dan Sugalski:
># ># Okay, I've checked in the final changes to this edit of
># PDD 2, the #
># >vtable pdd. Tine to rip into it^W^W^Wexamine it closely. :)
># >
># >I guess I'm first.
># >
># >I think the PARROT_TRUE/PARROT_FALSE thing is a Really Bad Idea.
>#
># I'm not thrilled with it either, but I don't want to be checking the
># exception flag in the interpreter when we don't have to. I'm not at
># all happy about the calls that do have to check. I currently consider
># that the lesser of two evils. Evil, yes, just less evil
>#
># >I understand that we need a way to indicate exceptions.  However, I
># >think that it either must be out-of-band or it needs to have a much
># >rarer value.  I would much prefer if it was completely
># out-of-band, but
># >if that's not possible at least choose a different value; ~0
># jumps out
># >at me as a possibility.
>#
># Pssst. Brent. Don't tell anyone, but ~0 *is* -1... :)
>
>Um......quiet you!  ;^)
>
>OK, so maybe INT_MAX?

Everything else returns 0 (false in C parlance) on exception. I 
didn't want to break that pattern. Some things returning 0 on error 
and others returning something else on err is a mistake other people 
have made in the past, to their lasting regret. I'd rather make a 
different mistake. :)

>I think I've already asked this and you've already answered, but I can't
>find it by Googling the list archive, so I'll ask again.  What's so evil
>about setjmp/longjmp?  Threading shouldn't be an issue, as we have a
>handy per-thread place we can store the structures: the interpreter
>struct.

Threading may be an issue anyway. setjmp/longjmp is defined as 
non-threadsafe on a number of platforms, and regardless of whether 
our usage should or shouldn't be safe, I'm willing to trust the man 
pages. Systems may well be doing other "interesting" things when 
threaded that setjmp/longjmp breaks. Otherwise I probably would--I 
don't want to pay the cost of checking for exceptions either.
-- 
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                       teddy bears get drunk

Reply via email to