RE: An extended discussion of extensibility

From: Campbell, Robert D (UK Edinburgh) <"Campbell,>
Date: Wed, 01 Dec 2004 12:09:56 +0000

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



>> > >> > With LibRandom you have to create a 'Variate' object, but

>> > >>
>> >
>> > >> But WHY do you think one cannot prepackage standard

>> >
>> > >> variates as read-only exported variables?
>> > >> This is the third time already this issue occurs!
>> > >> Stan was first to point it out a while ago, I

>> discussed it too...
>> >
>> > It would not work here. Variates cannot be global variables
>> > as they have private state:
>>

>> There are many exported variables declared with ABSTRACT

>> types in BlackBox that have private state.
>> They contain references to (hidden) concrete types that are

>> extensions of their static type.
>> For instance, TextViews.dir has static type

>> TextViews.Directory and dynamic type StdDirectory.
>>

>> At initialization, an object with a concrete extending type

>> is allocated and the pointer is assigned to the global variable.
>> They call it "separation of interface from implementation".
>> It's one of the cornerstones of BlackBox.
>> The more flexible and general one's framework has to be,

>> the more important this principle is.
>>

>> Cheers
>> Fyodor

I suspect I don't like the design of TextViews.dir. I use
it quite happily for years then along comes another module
that changes the attributes to 50 point red digbats. The next
time I use it my Text does not work as I expect and want.

Surely (with a few exceptions) it is not good to rely on
side effects of (non-readonly, or more precisely non-alterable)
global variables.

I have a simulation using Normal Variates with standard deviation = 1.
Some other module changes this to sd = 5 for it's use. Now when I use it
again I get the wrong distribution. Safety demands that my Random Variable,
with it's state, are private to my simulation (which in fact may
simultaneously need several different Normal Variates simultaneously).

Is it time to agree to differ?

Cheers, Robert

ps - I am not against abstract directories as such. Look at the
interface for AlgebraRings; you will fine TWO abstract directory
types and no concrete ones.

********************************************************************
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.


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

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIFxwYXINClxwYXINCj4+ICA+ID4+ICA+IFdpdGgg
TGliUmFuZG9tIHlvdSBoYXZlIHRvIGNyZWF0ZSBhICdWYXJpYXRlJyBvYmplY3QsIGJ1dFxwYXIN
Cj4+ICA+ID4+XHBhcg0KPj4gID5ccGFyDQo+PiAgPiA+PiAgQnV0IFdIWSBkbyB5b3UgdGhpbmsg
b25lIGNhbm5vdCBwcmVwYWNrYWdlIHN0YW5kYXJkXHBhcg0KPj4gID5ccGFyDQo+PiAgPiA+PiAg
dmFyaWF0ZXMgYXMgcmVhZC1vbmx5IGV4cG9ydGVkIHZhcmlhYmxlcz9ccGFyDQo+PiAgPiA+PiAg
VGhpcyBpcyB0aGUgdGhpcmQgdGltZSBhbHJlYWR5IHRoaXMgaXNzdWUgb2NjdXJzIVxwYXINCj4+
ICA+ID4+ICBTdGFuIH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lcnZlciB3aWxsIHJlY29nbml6ZSB5b3UgYXMgc3Vic2NyaWJlciBhbmQgZm9yd2Fy
ZCB5b3VyIHBvc3RpbmcgaW1tZWRpYXRlbHksIHdpdGhvdXQgY3JlYXRpbmcgYW55IG92ZXJoZWFk
LlxwYXINClxwYXINCmIpIElmLCBmb3Igc29tZSByZWFzb24sIHlvdSBjYW5ub3QgcG9zdCBmcm9t
IHRoZSBhZGRyZXNzLCBieSB3aGljaCB5b3UgYXJlIHN1YnNjcmliZWQsIHlvdXIgbWVzc2FnZSB3
aWxsIGJlIG1vZGVyYXRlZCB0byBhdm9pZCBzcGFtLiBQbGVhc2UgdW5kZXJzdGFuZCB0aGF0IG1v
ZGVyYXRpb24gd2lsbCBvZnRlbiBjYXVzZSBzb21lIGRlbGF5LCBpbiBwYXJ0aWN1bGFyIG92ZXIg
d2Vla2VuZHMgb3IgaG9seWRheXN9fQB0IGlzIA=


----boundary-LibPST-iamunique-618869415_-_---
Received on Wed Dec 01 2004 - 13:09:56 UTC

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