Re: [BLACKBOX] Exporting records / record fields question

From: [at]} <Rex>
Date: Fri, 30 Jul 2010 08:52:12 -0500

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

At 08:12 AM 7/28/2010, Alexander Iljin wrote:
> The real-world scenario for this is when you don't want to publish
>the record type so that client modules can't make extensions.

>...I use this feature to control extensibility in my Oberon-2 programs.
> Also, you can create enumerations with objects like week days:
>TYPE
> WeekDay = POINTER TO RECORD dayNumber-: INTEGER END; (* the type is
>not published *)
>VAR
> monday-, tuesday-, ... : WeekDay; ....

        Amazing! Or in colloquial English, awsome.


Chris Burrows wrote:
>In Section 8.3.1 it states: "Note that when fields in a record r are
>exported, r should be exported too".

        A rule that's apparently not in the language specification. I think the language specification takes precedence.

        This is not the first time someone has found a useful loophole in a specification. Unless some harm can be identified, it is usually a mistake to attempt to plug loopholes in later specifications, since such attempts break code. I really, really hate changes that break code.

Sincerely,
Rex Couture


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-550174215_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIEF0IDA4OjEyIEFNIDcvMjgvMjAxMCwgQWxleGFu
ZGVyIElsamluIHdyb3RlOlxwYXINCj4gIFRoZSByZWFsLXdvc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uXHBhcg0KXHBhcg0KICAgICAgICBU
aGlzIGlzIG5vdCB0aGUgZmlyc3QgdGltZSBzb21lb25lIGhhcyBmb3VuZCBhIHVzZWZ1bCBsb29w
aG9sZSBpbiBhIHNwZWNpZmljYXRpb24uICBVbmxlc3Mgc29tZSBoYXJtIGNhbiBiZSBpZGVudGlm
aWVkLCBpdCBpcyB1c3VhbGx5IGEgbWlzdGFrZSB0byBhdHRlbXB0IHRvIHBsdWcgbG9vcGhvbGVz
IGluIGxhdGVyIHNwZWNpZmljYXRpb25zLCBzaW5jZSBzdWNoIGF0dGVtcHRzIGJyZWFrIGNvZGUu
ICBJIHJlYWxseSwgcmVhbGx5IGhhdGUgY2hhbmdlcyB0aGF0IGJyZWFrIGNvZGUuXHBhcg0KXHBh
cg0KU2luY2VyZWx5LFxwYXINClJleCBDb3V0dXJlIFxwYXINClxwYXINClxwYXINCi0tLS1ccGFy
DQpUbyB1bnN1YnNjcmliZSwgc2VuZCBhIG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNL
Qk9YIiB0byBMSVNUU0VSVkBMSVNUUy5PQkVST04uQ0h9fQAAAAYQ
----boundary-LibPST-iamunique-550174215_-_---
Received on Fri Jul 30 2010 - 15:52:12 UTC

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