🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.oberon
Article #1310

Re: Why no Complex Arithmetic ?

#1310
From: B. Smith-Mannschott
Date: Wed, 10 Apr 1996 20:37
27 lines
1480 bytes
jneuhof@ibm.net writes:
>In <225BC72BH00088B82H@p.froehlich.amc.cube.net>, p.froehlich@amc.cube.net (Peter Froehlich) writes:
>>
>>   Although  a  complex  type seems pleasing, I'm not yet convinced that it
>>really  would  cause  a lot of algorithms to be converted to actually using
>>COMPLEX  instead  of  REAL.   Please  give  me  an  example  algorithm that
>>*seriously* benefits from a COMPLEX type.
>>
>
>What is missing in Oberon-2 is something like type-bound operators,
>implemented similar to type-bound procedures.
>
>E.g.:
>
>PROCEDURE( COMPLEX ) "+" 
>( VAR RVal1 : COMPLEX; 
>  VAR RVal2 : COMPLEX
>) : COMPLEX;
>BEGIN
>  ....
>END "+";

Yes, I've thought that too.  However, it would break Oberon's use of
fully qualified import and it would complicate the parser/compiler as
well.  It would be a nice feature, but I don't think it would be worth
the cost.  (As an example of what can happen if you take this
philosopy too far, take a look at C++.)
Technical Details
Message-ID: <199604102035.QAA02431@cs.oberlin.edu>
Path: arc1-ca.pugleaf.net!inf.ethz.ch!oberon-news@inf.ethz.ch

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!inf.ethz.ch!oberon-news@inf.ethz.ch
From: "B. Smith-Mannschott" <bsmith@eniac.ethz.ch>
Newsgroups: comp.lang.oberon
Subject: Re: Why no Complex Arithmetic ?
Date: 10 Apr 1996 22:37:51 +0200
Organization: Dept. Informatik, Swiss Federal Institute of Technology
Sender: server@inf.ethz.ch
Distribution: world
Message-ID: <199604102035.QAA02431@cs.oberlin.edu>
Reply-To: oberon-news@inf.ethz.ch
NNTP-Posting-Host: neptune.inf.ethz.ch
Originator: oberon-news@inf.ethz.ch