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

From: [at]} <CFB>
Date: Thu, 21 Feb 2008 11:10:35 +1030

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

> -----Original Message-----
> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
> Oleg N. Cher
> Sent: Thursday, 21 February 2008 2:23 AM
> To: BLACKBOX{([at]})nowhere.xy
> Subject: Re: [BLACKBOX] Read-only IN parameters for all data types
>
> It is serious argument. As a way of additional secure,
> the obvious indication of an invariance. And why you
> do not want to use for this purpose CONST? Instead of IN ?
>

For a new language it certainly could be a choice of IN, CONST, INPUT,
READONLY, NONMODIFIABLE etc. etc. IN is conveniently short it is also nice
and symmetrical with OUT. One passes data INto the procedure, the other
passes data OUT of the procedure.

In this mailing list I'm primarily concerned with Component Pascal. Oms
chose IN to refer to read-only parameters so the decision has already been
made.
 
>
> And I have made the shy remark, that parameters IN yet will need
> to be written down in almost each procedure, and it will make your
> Microbe sources incompatible with Component Pascal/Oberon-2.
>

Microbe is currently a strict subset of Component Pascal/Oberon-2. If I did
start to implement some of the other ideas I have canvassed then I would not
stop there, but I would also name the language 'something completely
different'. If Oms didn't adopt the idea of extending the use of IN
parameters to non-structured data types but I wanted to use them in Microbe
then I could perhaps go the Gardens Point Component Pascal route and
introduce a 'strict' option that rejects any non-standard extensions.

>
> Some things switched in Oberon-SA seem to me doubtful for
> convenient programming. Its can appear useful only for optimization.
> For example, what in convenience of restriction CASE that
> all elements of a choice followed successively?
> Or, only one size of type INTEGER? Good, let it will be only 32 bits,
> but as with it to save memory allocating the big array of
> small numbers {0..7}?
>
> I think more likely, that the Oberon-SA is a hobby of Prof.
> Wirth, than
> the serious industrial decision, But I can be not right.
>

Certainly Wirth views compilers differently to most, but that is because he
understands them so well and can tailor them so easily to meet his current
needs. And why not? He has spent much of his working life trying to make
compiler technology more accessible and adaptable by mere mortals like
ourselves to encourage us to do just that.

Normally, we, because we know how software works, view software differently
from the average computer user. If we can't find a tool to do a job we write
one. However, most developers succumb to being just an average computer user
when development tools (compilers, linkers, IDEs etc) are the software in
question.

We should stop thinking of a compiler as a 'black box' tool (pun intended)
and not be frightened to modify it if the resulting benefits outweigh the
cost. Paul Reed of Padded Cell Software is one example of a developer I am
aware of who advocates this approach and uses it in his own work:

http://www.springerlink.com/content/b2t1uu82lkqf3yah/

Now we have the source code to Component Pascal we can tailor it to suit
specific projects if appropriate. If we come up with any ideas that we think
would be of benefit to the wider community then we can submit them to Oms.
If they are accepted and integrated into the core system then everybody
wins.

Regards,
Chris Burrows
CFB Software
http://www.cfbsoftware.com/cp


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1984068669_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwID4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS1c
cGFyDQo+IEZyb206IEJsYWNrQm94IFttYWlsdG86QkxBQ0tCT1hATElTVFMuT0JFUk9OLkNIXSBP
biBCZWhhbGYgT2YgXHBhcg0KPiBPbGVnIE4uIENoZXJccGFyDQo+IFNlbnQ6IFRodXJzZGF5LCAy
MSBGZWJydWFyeSAyMDA4IDI6MjMgQU1ccGFyDQo+IFRvOiBCTEFDS0JPWEBMSVNUUy5PQkV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MgaXQgaW4gaGlzIG93biB3b3JrOlxwYXINClxwYXINCmh0dHA6Ly93d3cuc3ByaW5n
ZXJsaW5rLmNvbS9jb250ZW50L2IydDF1dTgybGtxZjN5YWgvXHBhcg0KXHBhcg0KTm93IHdlIGhh
dmUgdGhlIHNvdXJjZSBjb2RlIHRvIENvbXBvbmVudCBQYXNjYWwgd2UgY2FuIHRhaWxvciBpdCB0
byBzdWl0XHBhcg0Kc3BlY2lmaWMgcHJvamVjdHMgaWYgYXBwcm9wcmlhdGUuIElmIHdlIGNvbWUg
dXAgd2l0aCBhbnkgaWRlYXMgdGhhdCB3ZSB0aGlua1xwYXINCndvdWxkIGJlIG9mIGJlbmVmaXQg
dG8gdGhlIHdpZGVyIGNvbW11bml0eSB0aGVuIHdlIGNhbiBzdWJtaXQgdGhlbSB0byBPbXMuXHBh
cg0KSWYgdGhleSBhcmUgYWNjZXB0ZWQgYW5kIGludGVncmF0ZWQgaW50byB0aGUgY29yZSBzeXN0
ZW0gdGhlbiBldmVyeWJvZHlccGFyDQp3aW5zLiBccGFyDQpccGFyDQpSZWdhcmRzLFxwYXINCkNo
cmlzIEJ1cnJvd3NccGFyDQpDRkIgU29mdHdhcmVccGFyDQpodHRwOi8vd3d3LmNmYnNvZnR3YXJl
LmNvbS9jcFxwYXINClxwYXINClxwYXINCi0tLS1ccGFyDQpUbyB1bnN1YnNjcmliZSwgc2VuZCBh
IG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VSVkBMSVNUUy5P
QkVST04uQ0hccGFyDQp9
----boundary-LibPST-iamunique-1984068669_-_---
Received on Thu Feb 21 2008 - 01:40:35 UTC

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