🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.modula2
1 messages
1 total messages Started by crb Mon, 09 Feb 1987 16:47
Exception Handling
#3603
Author: crb
Date: Mon, 09 Feb 1987 16:47
37 lines
2451 bytes
> Could we get a discussion going on exception handling in Modula-2? ...

I agree with the opinion expressed by some others that the lack of a
defined mechanism for dealing with exceptional conditions is a shortcoming.
And I do not believe that such capability is in violation of the principles
of gotoless programming, if designed in such a way that the potential
behavior of a program is easy to understand by static inspection of the
program text.

I think setjmp/longjmp is truly awful -- the user's program flow becomes 
extremely convoluted -- and the routines themselves are quite ugly, too.

One could argue that other languages (COBOL, FORTRAN, ... ) have gotten
along quite well without any defined exception-handling capability, but
these aren't languages in the same league, or of the same "generation"
as are Modula-2 and Ada.  Personally, I'd like to see this particular
capability made part of the language, if it was cheap to implement and
cheap at runtime.   And I'd a lot rather see it made part of the standard
than to have umpteen different vendors go off and invent umpteen different
ways to do it.  And at least umpteen will do so.

In light of this, I'd like to suggest that people interested in the
topic would do well to consider the proposal put forth by Martin Odersky,
Peter Sollich, and Mike Weisert of Borland International,  which was
written up in the November '85 issue of the MODUS quarterly (page 13).
I think it makes pretty good sense; it's "elegant" and it wouldn't cost too
much to implement.  The only disagreement I've got with it is their idea
of the RAISE construct optionally allowing a character string, and then
not making that string available to the handler which captures the exception.


-- Chuck Bilbe
   Modula-2 Project Leader
   Sun Microsystems

(* the opinions expressed here are my own and don't necessarily *)
(* reflect the opinions or plans of Sun Microsystems.           *)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads