[BLACKBOX] Seasons Greetings from Linuxland

From: [at]} <Les>
Date: Tue, 28 Dec 2010 15:31:15 +0000

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

I do not plead guilty to muddled thinking nor am I concerned about
programmers' understanding about Boolean Logic.

A C programmer can make exactly the same argument that he/she has to
evaluate an expression and then read two additional lines to understand
what the outcome was if the initial complex expressions are expanded
(a.k.a. made long winded).

  // z = x++ + y++;
   z = x + y;
   x++;
   y++;

  // z = x++ + ++y;
  ++y;
  z = x + y;
  x++;

  // z = ++x + y++;
  ++x;
  z = x + y;
  y++;

  //z = ++x + ++y;
  ++y;
  ++x;
  z = x + y;

But which forms best express what the program writer intended?

Good program readability is important whatever the language which is
being used and anything which enhances it is to be welcomed and anything
which detracts from it is to be discouraged.

This is of course only an opinion. But I see no point in tut-tut-ing
about the deficiencies and obscurities of C, and then falling into the
same trap myself.

Les May


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-506215142_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIEkgZG8gbm90IHBsZWFkIGd1aWx0eSB0byBtdWRk
bGVkIHRoaW5raW5nIG5vciBhbSBJIGNvbmNlcm5lZCBhYm91dCBccGFyDQpwcm9ncmF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ZWxjb21lZCBhbmQgYW55dGhpbmcgXHBhcg0Kd2hpY2ggZGV0cmFjdHMgZnJvbSBp
dCBpcyB0byBiZSBkaXNjb3VyYWdlZC5ccGFyDQpccGFyDQpUaGlzIGlzIG9mIGNvdXJzZSBvbmx5
IGFuIG9waW5pb24uIEJ1dCBJIHNlZSBubyBwb2ludCBpbiB0dXQtdHV0LWluZyBccGFyDQphYm91
dCB0aGUgZGVmaWNpZW5jaWVzIGFuZCBvYnNjdXJpdGllcyBvZiBDLCBhbmQgdGhlbiBmYWxsaW5n
IGludG8gdGhlIFxwYXINCnNhbWUgdHJhcCBteXNlbGYuXHBhcg0KXHBhcg0KTGVzIE1heVxwYXIN
ClxwYXINClxwYXINCi0tLS1ccGFyDQpUbyB1bnN1YnNjcmliZSwgc2VuZCBhIG1lc3NhZ2Ugd2l0
aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VSVkBMSVNUUy5PQkVST04uQ0h9fQBp
QFBB
----boundary-LibPST-iamunique-506215142_-_---
Received on Tue Dec 28 2010 - 16:31:15 UTC

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