Another language in this category is Ada. Ada has exceptions more-or-less like
C++, and it has "finalization", which is more-or-less like C++ "destructors"
(although slightly more robust). So the requirements on the run-time system
and generated code are similar.
Ada compilers typically use the same trade-off as C++ -- near-zero cost to
enter an exception-handling region, but high cost to actually raise the
exception.
- Bob
Hi Bob,
Another language in this category is Ada. Ada has exceptions more-or-less like
C++, and it has "finalization", which is more-or-less like C++ "destructors"
(although slightly more robust). So the requirements on the run-time system
and generated code are similar.
yes, they are very close. One difference is that in C++ you can throw
an arbitrary object (which may require complicated finalization), while
with Ada you can basically at most throw a string.
Ciao,
Duncan.