Re: [BLACKBOX] Exporting records / record fields question

From: [at]} <Chris>
Date: Sat, 31 Jul 2010 10:23:45 +0930

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

> -----Original Message-----
> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
> Marc Martin
> Sent: Friday, 30 July 2010 11:17 PM
> To: BLACKBOX{([at]})nowhere.xy
> Subject: Re: [BLACKBOX] Exporting records / record fields question
>
> > In Section 8.3.1 it states: "Note that when fields in a record r are
> > exported, r should be exported too".
>
> That makes it sound like "good programming practice", not a "compiler
> requirement".
>

Yes - I agree that is what it sounds like. However, taking the part of the
devil's advocate, I would take the example one step further:

R = RECORD
      f1: INTEGER;
      f2: RECORD f3, f4*: INTEGER
      END
    END;

If it is only necessary to export the fields of a record and not the record
itself then, recursively, f4 should be visible to a client program. But if
it is, how on earth would you access it? Or should single-level records be
treated as an exceptional case?

I'm not sure how relevant it is but it should be noted that in Modula-2 it
would have been impossible to export a record field without exporting the
record itself.

Regards,
Chris


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1488700266_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwID4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS1c
c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y
dCB0aGUgZmllbGRzIG9mIGEgcmVjb3JkIGFuZCBub3QgdGhlIHJlY29yZFxwYXINCml0c2VsZiB0
aGVuLCByZWN1cnNpdmVseSwgZjQgc2hvdWxkIGJlIHZpc2libGUgdG8gYSBjbGllbnQgcHJvZ3Jh
bS4gQnV0IGlmXHBhcg0KaXQgaXMsIGhvdyBvbiBlYXJ0aCB3b3VsZCB5b3UgYWNjZXNzIGl0PyBP
ciBzaG91bGQgc2luZ2xlLWxldmVsIHJlY29yZHMgYmVccGFyDQp0cmVhdGVkIGFzIGFuIGV4Y2Vw
dGlvbmFsIGNhc2U/XHBhcg0KXHBhcg0KSSdtIG5vdCBzdXJlIGhvdyByZWxldmFudCBpdCBpcyBi
dXQgaXQgc2hvdWxkIGJlIG5vdGVkIHRoYXQgaW4gTW9kdWxhLTIgaXRccGFyDQp3b3VsZCBoYXZl
IGJlZW4gaW1wb3NzaWJsZSB0byBleHBvcnQgYSByZWNvcmQgZmllbGQgd2l0aG91dCBleHBvcnRp
bmcgdGhlXHBhcg0KcmVjb3JkIGl0c2VsZi4gIFxwYXINClxwYXINClJlZ2FyZHMsXHBhcg0KQ2hy
aXNccGFyDQpccGFyDQpccGFyDQotLS0tXHBhcg0KVG8gdW5zdWJzY3JpYmUsIHNlbmQgYSBtZXNz
YWdlIHdpdGggYm9keSAiU0lHTk9GRiBCTEFDS0JPWCIgdG8gTElTVFNFUlZATElTVFMuT0JFUk9O
LkNIXHBhcg0KfQ==
----boundary-LibPST-iamunique-1488700266_-_---
Received on Sat Jul 31 2010 - 02:53:45 UTC

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