(unknown charset) [BLACKBOX] Read-only IN parameters for all data types (Was: Mobile-device development)

From: (unknown charset) Oleg N. Cher <"Oleg>
Date: Tue, 19 Feb 2008 11:25:12 +0200

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

Dear Chris,

>Incidentally, it was while working on this compiler that I realised there
>were no real implementation barriers to having read-only IN parameters for
>all data types. That was what prompted me to suggest in the Blackbox mailing
>list recently that it might be useful to remove this restriction from
>BlackBox.

Using IN parameters for all data types is a "katana",
(sharp-all-sides blade).
At reasonable not excessive use it well also has pluses:

- A programmer sees with the first sight at heading
  of procedure, what arguments are constantly. (+)

- Parameters IN can be used for building of more
  optimal machine code, in some cases. (+)

And minuses:

- However this opportunity is not for improvement
of recording of algorithms. Language Oberon has the good
notation providing well intelligibility. And using of
parameters IN is a first step to INLINE, #IFDEF/#ENDIF
and #INCLUDE of language C ;-) . Because this IN says
to compiler HOW to make more the best optimization. But
not WHAT programmer can say about recording algorithms. (-)

- It's unstandartized Oberon-feature. (-)

- Here the compiler can understand, that parameter IN
does not change anywhere (at second pass in moment of
compiling. More difficultly if compiler is one-passed).
So the obvious indication of IN from the given point
of view is excessive. (-)

I want to say what. When the programmer describes
the decision a tasks - it is the most important for him
WHAT is done, instead of HOW. And so IN here is an
indication to the compiler HOW more effectively to generate
a code instead of WHAT programmer wanted to say about an
algorithm of program.

And, as it is seen, completely superfluous indication, because
the "ideal" compiler will can understand that argument
does not change in the body of procedure - all necessary
information for this purpose is specified (withot IN).

I'll be glad to look another opinions.

P.S. Sorry, oh really sorry for bad English, I have not
   enough words for serious discussions.
                        

Oleg N. Cher,
Colossoft Research.
allot{([at]})nowhere.xy
2008-02-19


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-136756006_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTFcZnJvbXRleHQ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sb29rIGFu
b3RoZXIgb3BpbmlvbnMuXHBhcg0KXHBhcg0KUC5TLiBTb3JyeSwgb2ggcmVhbGx5IHNvcnJ5IGZv
ciBiYWQgRW5nbGlzaCwgSSBoYXZlIG5vdFxwYXINCiAgIGVub3VnaCB3b3JkcyBmb3Igc2VyaW91
cyBkaXNjdXNzaW9ucy5ccGFyDQpcdGFiIFx0YWIgXHRhYiBccGFyDQpccGFyDQpPbGVnIE4uIENo
ZXIsXHBhcg0KQ29sb3Nzb2Z0IFJlc2VhcmNoLlxwYXINCmFsbG90QHVrci5uZXRccGFyDQoyMDA4
LTAyLTE5XHBhcg0KXHBhcg0KXHBhcg0KLS0tLVxwYXINClRvIHVuc3Vic2NyaWJlLCBzZW5kIGEg
bWVzc2FnZSB3aXRoIGJvZHkgIlNJR05PRkYgQkxBQ0tCT1giIHRvIExJU1RTRVJWQExJU1RTLk9C
RVJPTi5DSH19AENIP2I=
----boundary-LibPST-iamunique-136756006_-_---
Received on Tue Feb 19 2008 - 10:25:12 UTC

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