Re: [BLACKBOX] IN Parameters - Making the design more regular

From: [at]} <Robert>
Date: Mon, 28 Jan 2008 22:37:23 +0000

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

CFB Software wrote:
> I propose that the following section of Paragraph 10.1 of the Component ...

Chris

I think this is a rather brave suggestion! I also think that
a full consideration of the suggestion would take quite a lot
of words.

So, in brief ...

1 - I agree that keywords like IN & OUT are a valuable documentation aid, and
can usefully 'clarify source code'.

2 - I agree that allowing them for REAL, BYTE, SET etc would increase
regularity, and their lack is sometimes a (minor) problem. It would sometimes be
better have them.

3 - I disagree that IN variables should (always) be passed by value. If you are
passing a large RECORD or ARRAY it is much more efficient to simply pass 1
address. Your comments are inconsistent. How can both quotes below be true?

  - "Value and input (keyword IN) parameters are local
variables to which the value of the corresponding actual parameter is
assigned as an initial value"
- "The compiler developer is still free to implement efficient handling of
records and arrays when used as input parameters. As is the case currently,
such parameters do not need to be copied to the stack when the procedure is
invoked"

Anyway, I want to know that the compiler writer has implemented passing a large
IN array efficiently, not just be assured that he/she is permitted to do so.

4 - One advantage of "OUT REAL"s, for example, that has not been mentioned is
that the Analyzer can warn you that such a variable is used before set (OUT
variables are defined to be undefined on Procedure entry.).


5 - The biggest question of all is: If we start allowing some language changes
where do we stop, and how do we control this?

Regards

Robert


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1516349080_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2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IE9uZSBhZHZhbnRhZ2Ug
b2YgIk9VVCBSRUFMInMsIGZvciBleGFtcGxlLCB0aGF0IGhhcyBub3QgYmVlbiBtZW50aW9uZWQg
aXMgXHBhcg0KdGhhdCB0aGUgQW5hbHl6ZXIgY2FuIHdhcm4geW91IHRoYXQgc3VjaCBhIHZhcmlh
YmxlIGlzIHVzZWQgYmVmb3JlIHNldCAoT1VUIFxwYXINCnZhcmlhYmxlcyBhcmUgZGVmaW5lZCB0
byBiZSB1bmRlZmluZWQgb24gUHJvY2VkdXJlIGVudHJ5LikuXHBhcg0KXHBhcg0KXHBhcg0KNSAt
IFRoZSBiaWdnZXN0IHF1ZXN0aW9uIG9mIGFsbCBpczogSWYgd2Ugc3RhcnQgYWxsb3dpbmcgc29t
ZSBsYW5ndWFnZSBjaGFuZ2VzXHBhcg0Kd2hlcmUgZG8gd2Ugc3RvcCwgYW5kIGhvdyBkbyB3ZSBj
b250cm9sIHRoaXM/XHBhcg0KXHBhcg0KUmVnYXJkc1xwYXINClxwYXINClJvYmVydFxwYXINClxw
YXINClxwYXINCi0tLS1ccGFyDQpUbyB1bnN1YnNjcmliZSwgc2VuZCBhIG1lc3NhZ2Ugd2l0aCBi
b2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VSVkBMSVNUUy5PQkVST04uQ0hccGFyDQp9
----boundary-LibPST-iamunique-1516349080_-_---
Received on Mon Jan 28 2008 - 23:37:23 UTC

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