Behavior of the NCI PMC

chromatic chromatic at wgz.org
Mon Jan 3 05:10:06 UTC 2011


On Sunday 02 January 2011 at 20:39, Peter Lobsinger wrote:

> There are a lot of places in parrot where abnormal and unintended uses
> catch on assertions. Should all of these be exceptions? Do we have
> guidelines on what should be exception-guarded and what should be
> assertion-guarded? Is the distinction between assertion and exception
> useful in parrot?

Given that assertions are present only in unoptimized builds, and that (in 
this case) it's all too easy to produce exceptional behavior from pure PIR, 
this ought to be an exception.

That seems like a good general rule for user-visible code.  Where we can't (or 
have yet to) design an interface which prevents the possibility of invalid 
state on normal use, produce exceptions to prevent weird crashes.

-- c


More information about the parrot-dev mailing list