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

Exception handling [ was Re: Zeroes and infinities ]



Being familiar with coding at the instruction level, for run-time
environments, operating system interfaces, etc., I can assure you
that the distinctions Nick Maclaren stated between supporting an
effective Throw-Catch mechanism and simply terminating an entity
that is known to "the system" (which may be larger than what the
run-time environment controls) are all very real.

It would be nice if there was universal agreement and availability
of a decent user-level exception handling mechanism that languages
and run-time environments could exploit in a portable manner -- but
we are very far from that, for a number of reasons, some technical
but most institutional.  (The technical difficulties relate to the
difficulty of accomodating highly-parallel environments, given that
most of the experience comes from single-thread environments.)

If performance-be-damned, as some suggest for a selectable mode that
requires portably "reproducible" results, then there is no problem:
the compiler or interpreter can insert tell-the-system-where-I-am
notifications at block-entry and block-exit, as well as declaring
suitable resumption points.  Well, it doesn't actually need to tell
the "system"; it (the run-time environment) can keep track of it
privately and just declare a run-of-the-mill system signal handler
whose captured state it would simply ignore.  Whether that method
has a gross performance impact or a tolerable one depends on many
factors -- and a programmmer using the mechanism should be made
aware of that cost.


Michel.
Sent: 2007-06-07 13:11:57 UTC

754 | revision | FAQ | references | list archive