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

From: [at]} <Chris>
Date: Mon, 29 Jun 2009 13:13:19 +0930

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

>-----Original Message-----
>From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
>Marc Martin
>Sent: Monday, 29 June 2009 1:36 AM
>To: BLACKBOX{([at]})nowhere.xy
>Subject: Re: [BLACKBOX] BlackBox 1.6 final version?
>
>> I have a question: is there any chance that COMPLEX datatypes, as
>> discussed in the Oakwood Guidelines for Oberon-2, would be
>implemented

>> in BlackBox?
>
>I do mathematical programming, and it's always seemed fine to
>me that complex numbers can be defined by the user with RECORD
>types. Although if you want to use operators with complex
>types, perhaps you really should be asking for the ability to
>define operators? Some languages allow you to do this,
>including Zonnon, which seems to be Oberon/Modula-2/Pascal
>*without* the "keep it simple" philosophy.
>

Good point. It would make sense to consider implementing user-defined
operators as a way of supporting COMPLEX. The user would then have the added
advantage of being able to implement other common mathematical operations
(e.g. matrix multiplication).

The only disadvantages of this approach that I can think of are:

a) Code generated could be less efficient than if COMPLEX was a native data
type recognised by the compiler.

b) A 'clever' programmer could invent some 'weird and wonderful' uses
resulting in obscure / unmaintainable code.

User-defined operators have also been part of the "keep it simple" ETH
Oberon for some time now. They were originally defined as part of the
Oberon-X system in 2000.

http://www-old.oberon.ethz.ch/native/compiler/x.operators.html

Particularly interesting is that the link above also references the source
code of an implementation of Complex arithmetic using user-defined
operators. This was written by Alan Freed, the Oberon maths 'guru':

http://www-old.oberon.ethz.ch/native/compiler/examples/complex.txt

However, you don't need Oberon-X to try them out as these extensions have
also been available in the standard ETH Native Oberon System since release
2.2.3. The Windows plug-in version can be downloaded from:

http://www.oberon.ethz.ch/archives/systemsarchive/windows

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-367543106_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwID4tLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLVxw
YXINCj5Gcm9tOiBCbGFja0JveCBbbWFpbHRvOkJMQUNLQk9YQExJU1RTLk9CRVJPTi5DSF0gT24g
QmVoYWxmIE9mIFxwYXINCj5NYXJjIE1hcnRpblxwYXINCj5TZW50OiBNb25kYXksIDI5IEp1bmUg
MjAwOSAxOjM2IEFNXHBhcg0KPlRvOiBCTEFDS0JPWEBMSVNUUy5PQkVST04uQ0hccGFyDQo+U3Vi
amVjdDogUmU6IFtCTEFDS0JPWF0gQmxhY2tCb3ggMS42IGZpbmFsIHZlcnNpb24/XHBhcg0KPlxw
YXINCj4+IEkgaGF2ZSBhIHF1ZXN0aW9uOiBpcyB0aGVyZSBhbnkgY2hhbmNlIHRoYXQgQ09NUExF
WCBkYXRhdHlwZXMsIGFzIFxwYXINCj4+IGRpc2N1c3NlZCBpbiB0aGUgT2Frd29vZCBHdWlkZWxp
bmVzIGZvciBPYmVyb24tMiwgd291bGQgYmUgXHBhcg0KPmltcGxlbWVudGVkIFxwYXINCj4+IGlu
IEJsYWNrQm94P1xwYXINCj5ccGFyDQo+SSBkbyBtYXRoZW1hdGljYWwgcHJvZ3J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GlsZXIvZXhhbXBsZXMvY29tcGxleC50
eHRccGFyDQpccGFyDQpIb3dldmVyLCB5b3UgZG9uJ3QgbmVlZCBPYmVyb24tWCB0byB0cnkgdGhl
bSBvdXQgYXMgdGhlc2UgZXh0ZW5zaW9ucyBoYXZlXHBhcg0KYWxzbyBiZWVuIGF2YWlsYWJsZSBp
biB0aGUgc3RhbmRhcmQgRVRIIE5hdGl2ZSBPYmVyb24gU3lzdGVtIHNpbmNlIHJlbGVhc2VccGFy
DQoyLjIuMy4gVGhlIFdpbmRvd3MgcGx1Zy1pbiB2ZXJzaW9uIGNhbiBiZSBkb3dubG9hZGVkIGZy
b206XHBhcg0KXHBhcg0KaHR0cDovL3d3dy5vYmVyb24uZXRoei5jaC9hcmNoaXZlcy9zeXN0ZW1z
YXJjaGl2ZS93aW5kb3dzXHBhcg0KXHBhcg0KUmVnYXJkcyxccGFyDQpDaHJpcyBCdXJyb3dzXHBh
cg0KXHBhcg0KQ0ZCIFNvZnR3YXJlXHBhcg0KQXJtYWlkZSB2Mi4wOiBBUk0gT2Jlcm9uLTA3IERl
dmVsb3BtZW50IFN5c3RlbVxwYXINCmh0dHA6Ly93d3cuY2Zic29mdHdhcmUuY29tL2FybWFpZGVc
cGFyDQpccGFyDQpccGFyDQotLS0tXHBhcg0KVG8gdW5zdWJzY3JpYmUsIHNlbmQgYSBtZXNzYWdl
IHdpdGggYm9keSAiU0lHTk9GRiBCTEFDS0JPWCIgdG8gTElTVFNFUlZATElTVFMuT0JFUk9OLkNI
XH19AAAAAA==
----boundary-LibPST-iamunique-367543106_-_---
Received on Mon Jun 29 2009 - 05:43:19 UTC

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