RE: An extended discussion of extensibility

From: René A. Krywult <"René>
Date: Mon, 11 Oct 2004 15:27:59 +0200 (DFT)

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

This reminds me of the discussion about the FOR loop. In Oberon, Wirth eliminated it, because what it did could also be accomplished via WHILE, for instance. But in Oberon-2 he reintroduced it, not because it was so commonly used, IIRC, but because it was more elegant.

Rene

=============René A. Krywult
-------------------------------------------------
"Gûrberen," pent i naneth dî,
"mabapadan a ce darach sí!"
___________________________________



----- Original von: "Campbell, Robert D (UK Edinburgh)" <robert.d.campbell{([at]})nowhere.xy

>
>> I guess we agree that - on the pure Component Pascal level

>> - EXTENSIBLE RECORDs are unneccesary. The question was whether


>> EXTENSIBLE procedures are neccessary.

...
>> So with this the argument for EXTENSIBLE procedures vanished and they are

>> a matter of personal style as were EXTENSIBLE RECORDs and Fjodor is right,

>> both might - on the level of Component Pascal at least - be banned.

I think there is a flaw in the above conclusions, resulting from an unstated assumption.

People consider only what is NEEDED for correct function (usually using 'Initialisation'
as an example. There is also the question of what is DESIRABLE for correct function.

I give an example (taken from LibRandom, but there are many others).
This implements an ABSTRACT type meant to represent a mathematical object called
a Random Variate (or RV). These come in various flavours
with names such as 'Normal', 'Exponential', and in millions of
user specific flavours.

They can be (mathematically) described in many different
(but essentially equivalent) ways. Two of the most common
(and useful) are called the 'Pdf' and the 'Cdf'.

The ABSTRACT base type 'Variate' uses the (ABSTRACT) 'Pdf' to compute the 'Cdf'.
When Variate is extended to, for example, Exponential, it is NECESSARY to
implement the ABSTRACT base procedure Pdf, it is NOT NECESSARY to
implement the EXTENSIBLE procedure Cdf.

However, for the Exponential RV, Cdf has a very simple mathematical form and
it is very easy and very desirable (vastly faster, more accurate, simpler)
to reimplement Cdf as well.

On the other hand, for user defined RV's, it may be very difficult, if not impossible,
to reimplement Cdf directly, and depending on the application there may be no desire to
use the Cdf much anyway, so run-time efficiency is secondary to minimising coding effort.

The Component Pascal attribute EXTENSIBLE simply supports this 'optional'
reimplementation; I don't see an equally simple alternative.


Note that the above discussion has not used 'super' calls. Please ban these if you wish.
I, too, prefer 'upcalls' as suggested by Marc to 'super' calls.


Robert

********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.



-------------------------------------------
Versendet durch AonWebmail (webmail.aon.at)
--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.


----boundary-LibPST-iamunique-1806370898_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJpZXIgTmV3O30NCntcZjJc
Zm5pbFxmY2hhcnNldDIgU3ltYm9sO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liZWQsIHlvdXIgbWVzc2FnZSB3aWxsIGJlIG1vZGVyYXRlZCB0byBhdm9pZCBz
cGFtLiBQbGVhc2UgdW5kZXJzdGFuZCB0aGF0IG1vZGVyYXRpb24gd2lsbCBvZnRlbiBjYXVzZSBz
b21lIGRlbGF5LCBpbiBwYXJ0aWN1bGFyIG92ZXIgd2Vla2VuZHMgb3IgaG9seWR9fQBOU0lC0yZQ
Bw=


----boundary-LibPST-iamunique-1806370898_-_---
Received on Mon Oct 11 2004 - 15:27:59 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:28:34 UTC