From: Ersek, Laszlo on
In article <4JydnbCdGNgatgzWnZ2dnUVZ7rydnZ2d(a)bt.com>,
Richard Heathfield <rjh(a)see.sig.invalid> writes:

> Ersek, Laszlo wrote:

>> Because when read out loud, "i" is the subject.
>
> Again, your comment would only be relevant if this were English, which
> it isn't.

Exactly -- I'm a staunch member of the "7 == x" camp. I just tried to
explain why, as I perceive, Seebs thinks what he thinks. (Sorry if this
qualifies as bad etiquette.)

Cheers,
lacos
From: Tim Streater on
On 05/03/2010 16:04, Richard Heathfield wrote:
> Ersek, Laszlo wrote:
>> In article <OIidndrfAtccKg3WnZ2dnUVZ8sCdnZ2d(a)bt.com>,
>> Richard Heathfield <rjh(a)see.sig.invalid> writes:
>>
>>> Seebs wrote:
>>>
>>> <snip>
>>>
>>>> When I see "if (x != y)" in C, I
>>>> unconsciously perceive it to be the case that x could vary and y
>>>> couldn't.
>>> Why?
>>
>> Because he pronounces it as "x is not equal to y", and the subject of
>> that sentence is "x". "x" is the actor, the variable that is acting. "y"
>> is part of the prepositional phrase, it is static.
>
> This is C we're discussing, not English. It is folly to pretend that the
> rules of English apply to C.

But Richard, you have to read the code in order to interpret it mentally
and decide whether it's correct or not, or how to amend it. I gave up on
Forth, Lisp, and regexps for just this reason.

--
Tim

"That the freedom of speech and debates or proceedings in Parliament
ought not to be impeached or questioned in any court or place out of
Parliament"

Bill of Rights 1689
From: Richard Heathfield on
Ersek, Laszlo wrote:
> In article <4JydnbCdGNgatgzWnZ2dnUVZ7rydnZ2d(a)bt.com>,
> Richard Heathfield <rjh(a)see.sig.invalid> writes:
>
>> Ersek, Laszlo wrote:
>
>>> Because when read out loud, "i" is the subject.
>> Again, your comment would only be relevant if this were English, which
>> it isn't.
>
> Exactly -- I'm a staunch member of the "7 == x" camp. I just tried to
> explain why, as I perceive, Seebs thinks what he thinks. (Sorry if this
> qualifies as bad etiquette.)

I misinterpreted your reply, and misreplied accordingly. The
responsibility for bad etiquette in this subthread, if bad etiquette has
indeed transpired, is entirely mine.

--
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
From: William Ahern on
In comp.lang.c Keith Thompson <kst-u(a)mib.org> wrote:
> William Ahern <william(a)wilbur.25thandClement.com> writes:
> > In comp.unix.programmer Ike Naar <ike(a)localhost.claranet.nl> wrote:
> [...]
> >> Using ``='' for something other than equality was, in my opinion, the
> >> most unfortunate design decision in the design of C.
> >
> > But it does mean equality. In fact, it commands it.
>
> Not for volatile objects or NaNs.

The implementation may not comply, and by the standard rightly so. But "="
is nonetheless a command by the programmer to make the object equal. "="
isn't a cognate w/ the mathemetical symbol. It's merely overloaded. C is an
imperative language, afterall.
From: Richard Heathfield on
Tim Streater wrote:
> On 05/03/2010 16:04, Richard Heathfield wrote:
>> Ersek, Laszlo wrote:
>>> In article <OIidndrfAtccKg3WnZ2dnUVZ8sCdnZ2d(a)bt.com>,
>>> Richard Heathfield <rjh(a)see.sig.invalid> writes:
>>>
>>>> Seebs wrote:
>>>>
>>>> <snip>
>>>>
>>>>> When I see "if (x != y)" in C, I
>>>>> unconsciously perceive it to be the case that x could vary and y
>>>>> couldn't.
>>>> Why?
>>>
>>> Because he pronounces it as "x is not equal to y", and the subject of
>>> that sentence is "x". "x" is the actor, the variable that is acting. "y"
>>> is part of the prepositional phrase, it is static.
>>
>> This is C we're discussing, not English. It is folly to pretend that the
>> rules of English apply to C.
>
> But Richard, you have to read the code in order to interpret it mentally
> and decide whether it's correct or not, or how to amend it.

Right. But it makes more sense to read it in C than to read it in
English. [Analogy alert!] When deciding on the correctness of a passage
in French or German, one should read it in French or German, not English.

Thinking in a foreign language is difficult, but that does not mean that
the attempt should not be made when dealing with sentences written in
that language.

> I gave up on
> Forth, Lisp, and regexps for just this reason.

I have to confess that an utter inability to read, let alone think in,
Whitespace led me to reject that language without even trying to write a
single program in it. Regular expressions are actually a very good
example (or, perhaps, are very good examples) of how translation to
English doesn't really aid comprehension. You need to be able to think
in regexps if you're going to use them effectively. I'm okay with simple
regexps, but only because I've internalised them. The moment I find
myself trying to translate them into English, I know I've lost.

--
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
First  |  Prev  |  Next  |  Last
Pages: 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
Prev: integer
Next: shared memory question