K Stol writes: > From: "Leopold Toetsch" <[EMAIL PROTECTED]> > > The C<exit> can happen deeply inside some called subs. The exception > > can be caught e.g. in main, to do some cleanup before really shutting > > down. Makes sense to me. > > You've got a point there. But it's a bit a matter of taste I think. I seems > a bit odd to me that an exception is thrown while nothing unexpected is > done. Cleaning up is ok, of course. But IMHO an exception is an error in the > program after which the program can exit in a nice way (handle these > exceptions nicely). > So, popping an integer from the stack into a N-register, for example is an > exception (well, in that particular case it's a bug, probably), or when a > stack underflow occurs. Those thinks sound like exceptions to me. But > exiting the program is quite a normal thing.
Those things are interpreter exceptions -- the program did something the interpreter didn't expect. But I think the idea is to make C<exit> a control exception, much like Perl 6's C<leave> or C<next>. Those aren't erroneous conditions, they're just things that the behavior of exceptions are useful for implementing. And the same goes for C<exit>. Luke > Oh well, it's not *that* important. :-) > > Klaas-Jan > >