Re: [BLACKBOX] BlackBox 1.6 final version - COMPLEX datatypes?

From: [at]} <CFB>
Date: Sun, 5 Jul 2009 22:34:21 +0930

----boundary-LibPST-iamunique-1658101517_-_-
Content-type: text/plain

> -----Original Message-----
> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
> Sent: Sunday, 5 July 2009 5:31 PM
> To: BLACKBOX{([at]})nowhere.xy
> Subject: Re: [BLACKBOX] BlackBox 1.6 final version - COMPLEX
> datatypes?
>
>
> Conclusion? Maybe there is not a universal agreement on what
> is a right
> or good design, and so it would be better for the compiler
> NOT to implement
> Complex, but to implement facilities (Overloading, Structured
> returns) that
> facilitate external Complex libraries that can we written as required.
>

I agree. Without having had a close look at what is involved, my instinct
tells me that would actually be easier to implement in the compiler. It
would have the additional benefit of allowing DECIMAL maths, MATRIX maths,
etc. etc. all of which could then be implemented by others without any
knowledge of the internal workings of the compiler. As well as overloaded
operators and structured returns some mechanism would also be need to allow
the programmer to define complex literal values e.g. COMPLEX(1.0, 2.0). The
main disadvantage I can think of compared to having a built-in explicit
COMPLEX type and specific compiler-generated code for complex operations
would be lesser performance.

However, having just warned about 're-inventing the wheel' in a discussion
in the Usenet Modula-2 newgroup it suddenly occurred to me that COMPLEX was
included in the ISO Modula-2 standard. As Modula-2 is such a close relative
to CP it is worth checking what, why and how COMPLEX was handled there.

e.g. Guenter Dotzel wrote about his experiences implementing COMPLEX in the
VAX/VMS Modula-2 compiler

http://www.modulaware.com/mdlt06.htm

"It took me a full week to extend the VAX/VMS Modula-2 compiler MVR to fully
support complex including evaluation of constant complex operations and
VMS-debugger support for the new types."

I suggest we use that measure as the *absolute minimum* time needed to
implement something similar in BlackBox ;-)

Regards,
Chris Burrows

CFB Software
Armaide v2.0: ARM Oberon-07 Development System
http://www.cfbsoftware.com/armaide


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1658101517_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
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g0KXHBhcg0KSSBzdWdnZXN0IHdlIHVzZSB0aGF0IG1lYXN1cmUgYXMgdGhl
ICphYnNvbHV0ZSBtaW5pbXVtKiB0aW1lIG5lZWRlZCB0b1xwYXINCmltcGxlbWVudCBzb21ldGhp
bmcgc2ltaWxhciBpbiBCbGFja0JveCA7LSlccGFyDQpccGFyDQpSZWdhcmRzLFxwYXINCkNocmlz
IEJ1cnJvd3NccGFyDQpccGFyDQpDRkIgU29mdHdhcmVccGFyDQpBcm1haWRlIHYyLjA6IEFSTSBP
YmVyb24tMDcgRGV2ZWxvcG1lbnQgU3lzdGVtXHBhcg0KaHR0cDovL3d3dy5jZmJzb2Z0d2FyZS5j
b20vYXJtYWlkZVxwYXINClxwYXINClxwYXINCi0tLS1ccGFyDQpUbyB1bnN1YnNjcmliZSwgc2Vu
ZCBhIG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VSVkBMSVNU
Uy5PQkVST04uQ0hccGFyDQp9
----boundary-LibPST-iamunique-1658101517_-_---
Received on Sun Jul 05 2009 - 15:04:21 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:43 UTC