[
Lists Home |
Date Index |
Thread Index
]
- From: John Cowan <cowan@locke.ccil.org>
- To: James.Anderson@mecomnet.de
- Date: Tue, 19 Oct 1999 13:40:35 -0400 (EDT)
james anderson scripsit:
> one intrinsic problem with java parsers is that the java control model forces
> exceptions to unwind from the initiator's dynamic context before the handler
> obtains control.
It is no accident that C++ and Java have termination semantics only
for their exceptions. Unfortunately I cannot find a citation to this
story, but it is instructive.
Mesa, a dialect of Pascal with modules, exceptions, and many other things,
was the language of a group at Xerox PARC. Its exceptions were
defined with resumption semantics. Over the course of many years of
large-scale development, including the Xerox Star and ViewPoint
document workstations, it was found that wherever resumption was
actually employed, it was invariably buggy. One by one, resumptive
exception handlers were tracked down and removed, until in the end
nothing was left but termination.
The essential problem with resumption, IMHO, is that it breaks
encapsulation: the resumptive handler is written by the author of the
calling routine, but runs as a friend of the called routine.
To work correctly, then, the caller must know everything about the
callee.
--
John Cowan cowan@ccil.org
I am a member of a civilization. --David Brin
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
|