Re: [BLACKBOX] Read-only IN parameters for all data types

From: Campbell, Robert (SELEX GALILEO, UK) <"Campbell,>
Date: Wed, 20 Feb 2008 08:54:50 -0000

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

 

>> -----Original Message-----
>> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
>> Of CFB Software
>> Sent: 19 February 2008 23:42

>> NOTE: I stated above that IN parameters are *used* as value
>> parameters - whether the compiler writer *implements* them
>> as value, refererence or whatever for efficiency reasons
>> should not be something that the programmer should need to
>> be aware of - as long as the parameters *behave* as defined).
>>
>> Passing a pointer as an IN parameter could be viewed as
>> another example of side-effects. I have not been able to
>> think of a feasible way to protect IN parameters from
>> modification by side-effects as shown by Robert Campbell in
>> his Horrible example recently.


Chris

I can't remember the precise details (and I have thrown 'Horrible'
away!),
but I thought that the point is that to make Horrible predictable we
*do*
need to know if the parameter is passed by value or reference.

I accept that in 'sane' use we do not.

Regards

Robert

SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
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, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1177777867_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1x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gYXJlIGNvbmZp
ZGVudGlhbCB0byB0aGUgaW50ZW5kZWRccGFyDQpyZWNpcGllbnQgYW5kIG1heSBhbHNvIGJlIHBy
aXZpbGVnZWQuIElmIHlvdSBhcmUgbm90IHRoZSBpbnRlbmRlZFxwYXINCnJlY2lwaWVudCBwbGVh
c2UgZGVsZXRlIGl0IGZyb20geW91ciBzeXN0ZW0gYW5kIG5vdGlmeSB0aGUgc2VuZGVyLlxwYXIN
CllvdSBzaG91bGQgbm90IGNvcHkgaXQgb3IgdXNlIGl0IGZvciBhbnkgcHVycG9zZSBub3IgZGlz
Y2xvc2Ugb3JccGFyDQpkaXN0cmlidXRlIGl0cyBjb250ZW50cyB0byBhbnkgb3RoZXIgcGVyc29u
LlxwYXINCioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqXHBhcg0KXHBhcg0KXHBhcg0KLS0tLVxwYXINClRvIHVuc3Vic2Ny
aWJlLCBzZW5kIGEgbWVzc2FnZSB3aXRoIGJvZHkgIlNJR05PRkYgQkxBQ0tCT1giIHRvIExJU1RT
RVJWQExJU1RTLk9CRVJPTi5DSFxwYXINCn0
----boundary-LibPST-iamunique-1177777867_-_---
Received on Wed Feb 20 2008 - 09:54:50 UTC

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