🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.oberon
1 messages
1 total messages Started by B. Smith-Mannschott Wed, 10 Apr 1996 20:37
Re: Why no Complex Arithmetic ?
#1310
Author: 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++.)
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