[comp.lang.modula3] Recommended interfaces -- a suggestion

new@ee.udel.edu (Darren New) (02/12/91)

I see many places in the report where it says things like
"the implementation may define this runtime error as an
exception."  I would like to suggest that the standard-setters
adopt a policy somewhat like the required/recommended status
of the Internet RFCs.  That is, why not define an interface
in which runtime errors (or running out of memory during NEW :0)
which are defined as exceptions are declared. Give them standard
names.  Errors which cannot be caught this way would not be
declared in this interface (or would be commented out), but if they are
caught, they must be declared and must have the standard name.
Exceptions could include things like
  IntegerDivByZero,
  OutOfMemory,
  OutOfResource,
  UserKeyboardInterrupt,
  SystemShutdownInterrupt,
  and so on.
Some such exceptions would probably be included implicitly in all
RAISES clauses, while others could be listed explicitly.

This way, relying on being able to catch certain kinds of errors
(Out Of Memory, say) which may not be catchable would be caught
at compile time when the referenced exception is not declared in
the interface module. This could prevent the problems that C has
with 18gazillion different sets of SIGNALs, depending on which O/S
and compiler you are using.
                                    -- Darren

-- 
--- Darren New --- Grad Student --- CIS --- Univ. of Delaware ---
----- Network Protocols, Graphics, Programming Languages, 
      Formal Description Techniques (esp. Estelle), Coffee, Amigas -----
              =+=+=+ Let GROPE be an N-tuple where ... +=+=+=