From: Keith Thompson on
Rainer Weikusat <rweikusat(a)mssgmbh.com> writes:
> Rainer Weikusat <rweikusat(a)mssgmbh.com> writes:
>> Keith Thompson <kst-u(a)mib.org> writes:
>
> [...]
>
>>> The most
>>> common form of loop for iterating *up* through an array is:
>>>
>>> for (i = 0; i < N; i ++) [
>>> ... array[i] ...
>>> }
>>>
>>> oversteps the upper bound of the array.
>>
>> So, your reasoning goes roughly "well, ok, it is nonsense, but that's
>> what we always do".

No, my reasoning is "ok, this is a superfluous calculation, but that's
a trivial issue, not worth worrying about".

> I should have read this more carefully :->. You are actually already
> here (voluntarily) misinterpreting my statement, since none of the
> increments which are supposed to be performed by the code quoted above
> are technically useless, meaning, what I called 'overstepping the loop
> counter' does not occur here. You are just hoping that a careless
> reader (like me, for instance) takes your statement at face value,
> without recognizing that you are already writing about a completely
> different case.

It's entirely possible that I've missed some point you were trying
to make. It might even be my fault. I am not making intentional
mistakes and hoping that you'll miss them out of carelessness,
and I resent the accusation that I'm doing so.

The above loop iterates over array elements from 0 to N-1 inclusive.
On exit from the loop, i has the value N, which is one past the
desired range. This is very similar to what happens in pete's loop
that we were discussing upthread, though looking at it more closely
I see that i takes on values outside the desired range both before
and after the loop (it starts at N and ends up being (size_t)-1,
or SIZE_MAX).

--
Keith Thompson (The_Other_Keith) kst-u(a)mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
From: Keith Thompson on
Rainer Weikusat <rweikusat(a)mssgmbh.com> writes:
[...]
> If you desire to address the point I was trying to make, feel free to
> do so. These sideline battles are useless exercises.

I was trying to address the point that (I thought) you were trying
to make. Perhaps if you could restate the point more clearly,
I could try again to respond to it. Answering the questions I
asked you might help.

Or you can continue to falsely accuse me of deliberate dishonesty,
and neither of us will learn anything. It's your call.

--
Keith Thompson (The_Other_Keith) kst-u(a)mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
From: Nick Keighley on
On 7 Mar, 22:14, Seebs <usenet-nos...(a)seebs.net> wrote:
> On 2010-03-07, Nick Keighley <nick_keighley_nos...(a)hotmail.com> wrote:
> > On 5 Mar, 18:26, Seebs <usenet-nos...(a)seebs.net> wrote:


> >> Actually, I'm not exactly talking about English. I'm talking about the
> >> underlying cognitive structures English (and every other language) maps to.
>
> > ah! A disciple of Chompsky.I didn't know it had been proven beyond
> > doubt that such a Deep Structure existed

reinserted:
> > So far as I know, regardless of language, humans distinguish between the
> > topic and the comment (thanks to another poster for providing the
> > terminology).
>
> It hasn't been, but if you can find a counterexample to the claim that
> people generally distinguish between topic and comment, I'd love to see it.

to be honest I just don't see this in normal english. People
describing events often intersperse the interpreation of events or
motivation with what happened. This is why (most )people make poor eye
witnesses.

The whole business about footnotes in formal documents is to make a
clear distinction that isn't normally made.

<snip>
From: Seebs on
On 2010-03-08, Nick Keighley <nick_keighley_nospam(a)hotmail.com> wrote:
> On 7 Mar, 22:14, Seebs <usenet-nos...(a)seebs.net> wrote:
>> It hasn't been, but if you can find a counterexample to the claim that
>> people generally distinguish between topic and comment, I'd love to see it.

> to be honest I just don't see this in normal english. People
> describing events often intersperse the interpreation of events or
> motivation with what happened.

That has absolutely nothing to do with the distinction between topic and
comment.

> The whole business about footnotes in formal documents is to make a
> clear distinction that isn't normally made.

But again, nothing to do with the distinction I'm talking about.

When someone says "the bear ate Bob", the bear is the topic, "ate bob" is
the comment. When someone says "Bob was eaten by a bear", Bob is the topic,
"was eaten by a bear" is the comment.

So far as I know, everyone makes this distinction. While it's not a hard and
fast rule, it's nearly always the case that the focus of discussion is the
topic of the sentence, not the comment. Thus, "the bear ate Bob" is a
statement by someone who is trying to talk about the bear, while "Bob was
eaten by a bear" is a statement by someone who is trying to talk about Bob.

They don't have quite the same semantics. One has the implication "and we
care about what the bear did", the other has the implication "and we care
about what happened to Bob".

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam(a)seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
From: Nick Keighley on
could you stop snipping so greedily! I had to back up twenty messages
to find the context.

***
>>> 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.
***


On 8 Mar, 20:07, Seebs <usenet-nos...(a)seebs.net> wrote:
> On 2010-03-08, Nick Keighley <nick_keighley_nos...(a)hotmail.com> wrote:
> > On 7 Mar, 22:14, Seebs <usenet-nos...(a)seebs.net> wrote:


> >> It hasn't been, but if you can find a counterexample to the claim that
> >> people generally distinguish between topic and comment, I'd love to see it.
> > to be honest I just don't see this in normal english. People
> > describing events often intersperse the interpreation of events or
> > motivation with what happened.
>
> That has absolutely nothing to do with the distinction between topic and
> comment.
[...]
> When someone says "the bear ate Bob", the bear is the topic, "ate bob" is
> the comment.

this is a definition of "comment" I hadn't heard before. And an odd
one. Is it a technical term from linguistics or something?

So "topic" is what I'd call "subject" and "comment" is some sort of
"action"? A way to try and link psychology with OO programming?

> When someone says "Bob was eaten by a bear", Bob is the topic,
> "was eaten by a bear" is the comment.
>
> So far as I know, everyone makes this distinction.  While it's not a hard and
> fast rule, it's nearly always the case that the focus of discussion is the
> topic of the sentence, not the comment.  Thus, "the bear ate Bob" is a
> statement by someone who is trying to talk about the bear, while "Bob was
> eaten by a bear" is a statement by someone who is trying to talk about Bob.
>
> They don't have quite the same semantics.  One has the implication "and we
> care about what the bear did", the other has the implication "and we care
> about what happened to Bob".

And how does this apply to

if (3 == thingy)
do_something_with (thingy);

There are some pretty odd computer languages out there (APL, Lisp,
Forth, ML, prolog). People seem to write useful applications in them.
There are some pretty odd (to us) natural languages out there. But
three year olds learn them.

I'm very dubious about any argument that uses (cod?) psychology to
justify language choice (that way lies Perl!). Human beings (and, I
think programmers) are very flexible in what they find lingusitically
acceptable. I don't like 3 == thingy but I don't think it relates to
my cortextual wiring.


--
The use of the Chomsky formalism is also responsible for the term
"programming language", because programming languages seemed to
exhibit a strucure similar to spoken languages. We believe that
this term is rather unfortunate on the whole, because a programming
language is not spoken, and therefore is not a language in the true
sense of the word. Formalism or formal notation would have been
more appropriate terms.
Niklaus Wirth



First  |  Prev  |  Next  |  Last
Pages: 50 51 52 53 54 55 56 57 58 59 60 61 62 63
Prev: integer
Next: shared memory question