Re: small program
- From: Richard Heathfield <rjh@xxxxxxxxxxxxxxx>
- Date: Wed, 07 Oct 2009 16:59:11 +0000
In <op.u1fudugc5qv6o3@toshiba-laptop>, Morris Keesan wrote:
On Wed, 07 Oct 2009 04:55:55 -0400, Richard Heathfield
<rjh@xxxxxxxxxxxxxxx> wrote:
[re: x == 2 vs. 2 ==x]
Nick Keighley wrote:<snip>
The variable quantity coming before the constant.
Why? Surely they have equal relevance?
Yes, perhaps logically and mathematically, but psychology and
linguistics
are not logic and maths. Where I live, a native English speaker is
much, much,more likely to say things like, "If the door is open ..."
or "If the outside temperature is below 20 degrees ...", compared to
"If 'open' is the state of the door" or "If 20 degrees is greater
than the outside temperature".
For the first, in C we say if(is_open(door)), so it's beside the
point. The second isn't expressing an equality relationship, that's
beside the point too.
<snip>
(I wonder: if you write equality expressions as "2 == x", do you
also, for consistency, write code like "0 != x" and
"for (i = 0; sizeof chararray > i; i++)"?)
(a) Those aren't equality expressions. There is no !== operator, no =>
operator, no risk of accidentally assigning instead of comparing;
(b) I see no logical difference between x != 0 and 0 != x, so I don't
understand the point you're trying to make.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within
.
- Follow-Ups:
- Re: small program
- From: Keith Thompson
- Re: small program
- References:
- small program
- From: Bill Cunningham
- Re: small program
- From: jacob navia
- Re: small program
- From: Andrey Tarasevich
- Re: small program
- From: Richard Heathfield
- Re: small program
- From: Andrey Tarasevich
- Re: small program
- From: Nick Keighley
- Re: small program
- From: Richard Heathfield
- Re: small program
- From: Nick Keighley
- Re: small program
- From: Richard Heathfield
- Re: small program
- From: Morris Keesan
- small program
- Prev by Date: ┡┢┣2009 Cheap *** brand AAA True Leather handbags (Gucci,LV,Chanel,Versace,D&G....) at website: www.fjrjtrade.com {***}
- Next by Date: Re: Like a daemon, only dumber
- Previous by thread: Re: small program
- Next by thread: Re: small program
- Index(es):