🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #1478

Re: Exceptions

#1478
From: Stephen J Bevan
Date: Fri, 02 Oct 1992 09:46
15 lines
1156 bytes
In article <3565@creatures.cs.vt.edu> brueni@csgrad.cs.vt.edu (Dennis Brueni) writes:
   FROM A COMPILER'S POINT OF VIEW

	   PROCEDURE Divide(a,b: T):T;
	   PROCEDURE Divide(a,b: T):T RAISES {DivideByZero};

   The second example captures more information about the Divide procedure.
   This information can later be used by the compiler to enforce correct
   usage of the procedure.  Hence the argument favoring exception handling
   is very much identical to the argument in favor of strong typing.  

Could you expand on what exactly the compiler should check and how you
think it would be done?

bevan
Technical Details
Message-ID: <BEVAN.92Oct2104647@hippo.cs.man.ac.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!unipalm!uknet!mucs!m1!bevan
References: <5176@balrog.ctron.com> <gsc.717334211@coombs> <5275@balrog.ctron.com> <3565@creatures.cs.vt.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!unipalm!uknet!mucs!m1!bevan
From: bevan@cs.man.ac.uk (Stephen J Bevan)
Newsgroups: comp.lang.modula2
Subject: Re: Exceptions
Message-ID: <BEVAN.92Oct2104647@hippo.cs.man.ac.uk>
Date: 2 Oct 92 09:46:47 GMT
References: <5176@balrog.ctron.com> <gsc.717334211@coombs> <5275@balrog.ctron.com>
 <3565@creatures.cs.vt.edu>
Sender: news@cs.man.ac.uk
Organization: Department of Computer Science, University of Manchester
Lines: 15
In-reply-to: brueni@csgrad.cs.vt.edu's message of 1 Oct 92 16:40:34 GMT