Re: [BLACKBOX] Seasons Greetings from Linuxland

From: [at]} <Norayr>
Date: Tue, 28 Dec 2010 11:30:27 +0400

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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Regarding dangerous examples:

VAR i : INTEGER;
N : LONGINT;
...
FOR i := 0 to N DO
   ...
END;

Not all compilers check that.
And there's a trap, both metaphorical, and system.

Regarding the surprising fact that Pascal programmers performed not well:

 Let's not forget that today's pascal went far away from
Wirthian pascal. It is complicated, for instance, there's a lot of
different types of strings, whereas some of them managed by the internal
memory manager, and there's even reference counter, while some strings -
not.
There's generics, there's delegates, there's java like objects (TList),
so it's a mix of different concepts, tied together.
And only strings (as dynamic arrays) are enough to be not satisfied with
the clean design absence. Why strings differ from
other dynamic arrays? Why array of char is "better" than array of
integer? I mean, today's pascal is not comparable with Oberon and even
Modula-2.
On the other hand it still has modularity on the source code level, i.
e. though there's no technology that supports dynamic loading of dcu
files, but still, units are like modules, with the
interface/implementation sections and without unnecessary namespaces.
Of course modern Pascal has other advantages other C++, but it's still
definitely not as safe as Oberon.

Norayr

On 12/28/10 07:33, Wojtek Skulski wrote:
> Troy:
>
> thank you sharing the tip. Off the top of my head I would use
> meaningful labels.
>
> Note that the resource compiler is not a part of the language. It is an
> add-on tool. I personally use it a lot and I always find it very
> helpful, but it has its limits.
>
> If Oberon/CP was used to develop Linux, we would have seen gazzilions of
> such add ons. I am also afraid we would have seen operator overloading
> and what-not GNU extensions to the language.
>
> Cheers,
>
> W.
>
>
> On Mon, 27 Dec 2010, Stephen R. Troy wrote:
>
>> I have a program which uses an array, and I defined meaningful labels
>> as constants to help me remember the
>> meaning of each array element. And I placed text fields in a window
>> so I could monitor the contents of the
>> array, and exported the constant labels as well as the array. BUT
>> when I set the link for each text field as
>> "array[labelA]", "array[labelB]", etc., nothing showed up in the text
>> fields. Finally I changed the links to
>> "array[0]", "array[1]", etc. and that worked. The resource compiler
>> part of BlackBox may be a bit rudimentary.
>> Steve Troy
>> -------- Original Message --------
>> Subject: Re: [BLACKBOX] Re [BLACKBOX] Seasons Greetings from
>> Linuxland
>> From: Wojtek Skulski <skulski{([at]})nowhere.xy
>> Date: Mon, December 27, 2010 7:41 pm
>> To: BLACKBOX{([at]})nowhere.xy
>>
>> > The following hypothetical examples are intended to show what
>> a programmer
>> > could concoct if he has muddled thinking regarding boolean
>> logic [snip]
>>
>> My own conclusion is that one can write C in any language. One
>> also can
>> write reasonable code in C. Some languages encourage good
>> attitude while
>> others just the opposite, but at the end of the day it is the
>> attitude,
>> which differentiates the masters from their opposites.

>>
>> Playing devil's advocate, I remember my utter surprise when I read
>> statements in Project Oberon like "IF mouse = 1 THEN...". The
>> mouse keys
>> were numbered 1,2,3 (or 0,1,2, don't remember) and these numbers
>> were used
>> literally in the code published in the book (!!). A bit
>> shameful, was it
>> not? In later versions the literal constants we replaced with
>> ML, MM, and
>> MR, as they should have been from the beginning.
>>
>> Even our gurus have had their bad days.
>>
>> W.
>
>
> ----
> To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to
> LISTSERV{([at]})nowhere.xy

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNGZITAAoJEDbv/aplkZ1Fb3sH/RKAitjDoovb97UUSvB//unA
pJxnynvn424wcEwb7crvzPaIDR9TBBLIWdkM/XEezodhCriybtI+/B5k4bYoo6fh
KE/iEAkH9G0OjD7zhYl1mSLsTmHKJpH/sjKW4Sii4oDqtRVYCIdiRslC7YtB+PBd
f//BKOUw1wJ/LHxr+yYhZijsZw5byGTJDe9Isk0ykXJywCVoJ/mv44pYsWPavVa0
y6YLix7+XuWb3wLzY8fQuRnARNB36HVuaxAUmgyCM4j0KMkK9roqEvFrgwCiWI5F
G+cVKPKzFWheHgVgDdXLlmeZqkezc2tHebTghburUWcQhh0Tk3F/9j8iwoQcfJk=
=Wn18
-----END PGP SIGNATURE-----


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1111611292_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIC0tLS0tQkVHSU4gUEdQIFNJR05FRCBNRVNTQUdF
LS0tLS1ccGFyDQpIYXNoOiBTSEExXHBhcg0KXHBhcg0KUmVnYXJkaW5nIGRhbmdlcm91cyBleGFt
cGxlczpccGFyDQpccGFyDQpWQVIgaSA6IElOVEVHRVI7XHBhcg0KTiA6IExPTkdJTlQ7XHBhcg0K
Li4uXHBhcg0KRk9SIGkgOj0gMCB0byBOIERPXHBhcg0KICAgLi4uXHBhcg0KRU5EO1xwYXINClxw
YXINCk5vdCBhbGwgY29tcGlsZXJzIGNoZWNrIHRoYXQuXHBhcg0KQW5kIHRoZXJlJ3MgYSB0cmFw
LCBib3RoIG1ldGFwaG9yaWNhbCwgYW5kIHN5c3RlbS5ccGFyDQpccGFyDQpSZWdhcmRpbmcgdGhl
IHN1cnByaXNpbmcgZmFjdCB0aGF0IFBhc2NhbCBwcm9ncmFtbWVycyBwZXJmb3JtZWQgbm90IHdl
bGw6XHBhcg0KXHBhcg0KIExldCdzIG5vdCBmb3JnZXQgdGhhdCB0b2RheSdzIHBhc2N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VxwYXINClRvIHVuc3Vic2NyaWJlLCBzZW5kIGEgbWVz
c2FnZSB3aXRoIGJvZHkgIlNJR05PRkYgQkxBQ0tCT1giIHRvIExJU1RTRVJWQExJU1RTLk99fQA5
0yPR4pBHSU51MEc=
----boundary-LibPST-iamunique-1111611292_-_---
Received on Tue Dec 28 2010 - 08:30:27 UTC

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