Re: [BLACKBOX] Seasons Greetings from Linuxland

From: [at]} <Chris>
Date: Wed, 22 Dec 2010 09:15:20 +1030

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

>-----Original Message-----
>From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
>Bernhard Treutwein
>Sent: Wednesday, 22 December 2010 7:16 AM
>To: BLACKBOX{([at]})nowhere.xy
>Subject: Re: [BLACKBOX] Seasons Greetings from Linuxland
>
>but (I guess) it would be easier to program a safe system in a
>safe language than in an unsafe language like C (the holy gnu) ...
>

I believe so - C just gives you so many different wonderful ways to shoot
yourself in the foot. A few days ago a C programmer was complaining in
another group that the following "does not work, gives unexpected results":

  digdata[digNr] = (bitdata[bitNr++] * 8) + (bitdata[bitNr++] * 4) +
(bitdata[bitNr++] * 2) + (bitdata[bitNr++]);

That reminded me of something Wirth said in his paper "Good Ideas, Through
the Looking Glass" which can be downloaded from:

http://www.inf.ethz.ch/personal/wirth/index.html

-----------------------------------

"The ugliness of a construct usually appears in combination with other
language features. In C, we may write, for example, x+++++y, a riddle rather
than an expression, and a challenge for a sophisticated parser! Guess what?
Is its value is equal to ++x+++y+1? Or is the following correct?

  x+++++y+1==++x+++y

  x+++y++==x+++++y+1

One is tempted to postulate a new algebra! It is indeed absolutely
surprising with which eqanimity this notational monster was accepted by the
world-wide programmer's community"

-----------------------------------

He also has something to say about the use of typecasts (a.k.a. 'loopholes')
in the same paper ...

Regards,
Chris

Chris Burrows
CFB Software
http://www.cfbsoftware.com


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-503305889_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ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srKysreSsxIFxwYXINClxwYXINCk9uZSBpcyB0ZW1wdGVkIHRv
IHBvc3R1bGF0ZSBhIG5ldyBhbGdlYnJhISBJdCBpcyBpbmRlZWQgYWJzb2x1dGVseVxwYXINCnN1
cnByaXNpbmcgd2l0aCB3aGljaCBlcWFuaW1pdHkgdGhpcyBub3RhdGlvbmFsIG1vbnN0ZXIgd2Fz
IGFjY2VwdGVkIGJ5IHRoZVxwYXINCndvcmxkLXdpZGUgcHJvZ3JhbW1lcidzIGNvbW11bml0eSJc
cGFyDQpccGFyDQotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVxwYXINClxwYXIN
CkhlIGFsc28gaGFzIHNvbWV0aGluZyB0byBzYXkgYWJvdXQgdGhlIHVzZSBvZiB0eXBlY2FzdHMg
KGEuay5hLiAnbG9vcGhvbGVzJylccGFyDQppbiB0aGUgc2FtZSBwYXBlciAuLi5ccGFyDQpccGFy
DQpSZWdhcmRzLFxwYXINCkNocmlzXHBhcg0KXHBhcg0KQ2hyaXMgQnVycm93c1xwYXINCkNGQiBT
b2Z0d2FyZVxwYXINCmh0dHA6Ly93d3cuY2Zic29mdHdhcmUuY29tXHBhcg0KXHBhcg0KXHBhcg0K
LS0tLVxwYXINClRvIHVuc3Vic2NyaWJlLCBzZW5kIGEgbWVzc2FnZSB3aXRoIGJvZHkgIlNJR05P
RkYgQkxBQ0tCT1giIHRvIExJU1RTRVJWQExJU1RTLk9CRVJPTi5DSFx9fQANCkw=
----boundary-LibPST-iamunique-503305889_-_---
Received on Tue Dec 21 2010 - 23:45:20 UTC

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