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

From: [at]} <Rex>
Date: Tue, 19 Feb 2008 15:31:06 -0600

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

Chris,
        Thanks for figuring this out. You're ahead of most of us on this one.

        As much as I hate to see any fork, I like the suggested modifications. Unless you remove passing by value from the interface, the changes would rarely break any existing code. Future code written to the suggested specifications would not be backward-compatible, but the differences would be easy to understand and easy to fix at compile time.

        The one exception is that the changes might break existing code in case of mixed-language programming. That is always so implementation-specific anyway that I don't see a problem, as long as the exact behavior of the compiler is carefully documented, and clearly tagged as a variation from the spec.

        I was going to suggest just removing the keyword "IN", but you reminded us why it's useful to declare the intention before all parameters. As long as you're forking anyway, you might as well just require the use of "IN", "OUT", or "VAR".

        While you are at it, if you are still serious about porting the compiler, there's one other language detail you might consider fixing. Because of the way the FOR statement is defined,
FOR i:= 1 to MAX (INTEGER) DO;
is an infinite loop. The Pascal specification avoids this problem, and I can't imagine that it entails a substantial computational cost. I don't have my copy of Jensen and Wirth here, but e-mail me if you need a copy.

Sincerely,
Rex Couture


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1106863655_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIENocml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BtZXNzYWdlIHdpdGggYm9keSAiU0lHTk9GRiBCTEFDS0JPWCIgdG8gTElTVFNFUlZATElT
VFMuT0JFUk9OLkNIfX0AICAgIA==
----boundary-LibPST-iamunique-1106863655_-_---
Received on Tue Feb 19 2008 - 22:31:06 UTC

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