🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #297

Re: Defining Operators

#297
From: Stefan Ludwig
Date: Sat, 30 Sep 1989 05:00
32 lines
2001 bytes
In article <INFO-M2%89093000360807@UCF1VM> Modula2 List <INFO-M2%UCF1VM.BITNET@PSUVM.PSU.EDU> writes:
[stuff deleted]
>    Which (algebraically) reads exactly as you mean it.  In Ada you can
>  define the '+' operator to be able to handle the Complex number type.
>
>    Would such a feature be warranted in Modula-2?
>
>    Here is some theoretical code:
[stuff deleted]
>    The compiler or translator could substitute the necessary procedure
>  and make sure that the correct types are being used.
>    Thus, the compilable code would look like:
[stuff deleted]
I recently suggested operator overloading to Prof. Wirth. His argument is:
the possibility you gain for coding programs does not justify the added
complexity to the compiler. This guy is running for 'the smallest compiler
in the world'-contest. His compilers are *really* small and *fast*.
The Oberon compiler for the Ceres (NS32000 based) is just 39KB object code!
It sure would be a nice feature to have, especially when you have object-
oriented features (like in Object-Oberon). We're thinking about adding that
to our Object-Oberon compiler...We'll see, just stay tuned.
>
>    Alex
>    Just this guy...

	Stefan

Stefan HM Ludwig	"Don't flame my english, it's what
			 they teach us in Swiss schools"

E-MAIL:		sludwig@ics.uci.edu		until October 21st
		ludwig@badile.iis.ethz.ch	later
Technical Details
Message-ID: <1989Sep30.050044.12442@paris.ics.uci.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!ames!henry.jpl.nasa.gov!elroy.jpl.nasa.gov!ucla-cs!uci-ics!sludwig
References: <INFO-M2%89093000360807@UCF1VM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!ames!henry.jpl.nasa.gov!elroy.jpl.nasa.gov!ucla-cs!uci-ics!sludwig
From: sludwig@ics.uci.edu (Stefan Ludwig)
Newsgroups: comp.lang.modula2
Subject: Re: Defining Operators
Summary: feel free to do it !
Keywords: Modula-2, operator overloading
Message-ID: <1989Sep30.050044.12442@paris.ics.uci.edu>
Date: 30 Sep 89 05:00:44 GMT
References: <INFO-M2%89093000360807@UCF1VM>
Sender: news@paris.ics.uci.edu (Network News)
Reply-To: Stefan Ludwig <sludwig@ics.uci.edu>
Organization: University of California, Irvine - Dept of ICS
Lines: 32