Re: best way to enumerate List<> & remove unwanted elements?
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Tue, 15 May 2007 19:34:12 +0100
<"Mr. Arnold" <MR. Arnold@xxxxxxxxxx>> wrote:
I am completely lost with your position.
I see it differently, and somehow you got it into your head that what I told
you what you were doing was wrong. I don't recall me writing the word
*wrong* in any sentence.
You don't need to write the word "wrong" in order to give the
impression that what someone is doing is wrong. For instance:
<quote>
All I said was not to decrement (i) like that, that the loop is
controlling, which could possibly lead to a termination at RemoveAt(i).
</quote>
Telling someone not to do something gives the impression that you think
that what they're doing is wrong, doesn't it?
Likewise:
<quote>
No, you don't decrement (i) like that, you're going to eventually blow
up at that RemoveAt(i).
</quote>
Saying that someone's code will "eventually blow up" is telling them
that their code is wrong, in my opinion.
Just as another example of this, but this time from me, just now:
Saying that the loop will blow up is an incorrect statement.
There - I've just said that you were wrong, without using the word
"wrong" in the sentence at all, haven't I?
If you go back to my posts to you or to this other person Pete, you pick the
one sentence where I wrote the word *wrong*.
That's easy:
<quote>
Again, I never said there was nothing wrong with the code.
</quote>
Message-ID: <#uKDJdrlHHA.1624@xxxxxxxxxxxxxxxxxxxx>
The double negative doesn't help matters, but it certainly includes the
word "wrong".
All I said is that you shouldn't use (i) the way you were doing it, because
that could lead to the loop blowing.
Except that it couldn't, which is Pete's point. The code *won't* blow
up, unless there really *is* a bug in .NET in this respect, which
(despite your later claims to the contrary) you heavily implied that
there is.
That doesn't mean the code is the best way of writing it - no-one ever
claimed it is. We've just all maintained that it won't "blow up" at
mylist.Remove(i) contrary to your claim.
Now, were you actually maintaining that you believe there *is* a bug in
..NET (in which case you should apologise to Peter for saying "This is
all coming from you. I didn't say anything about .NET being buggy.
It's out of your mouth that it's being said") or were you maintaining
that the code did actually have something wrong with it, a logical
error which can cause it to fail *without* there being a bug in .NET
(in which case you should show that error)?
I really don't care. It's much to do about nothing with you and the *loop*.
The trouble is that by repeatedly claiming that the loop won't work
without giving any evidence, and by making ad hominem attacks, you've
made it about more than the loop. You've made it about an inability to
back down.
I wouldn't have got involved in this thread at all if you hadn't
started attacking Peter without any cause, for example.
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.
- Follow-Ups:
- Re: best way to enumerate List<> & remove unwanted elements?
- From: Mr. Arnold
- Re: best way to enumerate List<> & remove unwanted elements?
- References:
- best way to enumerate List<> & remove unwanted elements?
- From: Zytan
- Re: best way to enumerate List<> & remove unwanted elements?
- From: Zytan
- Re: best way to enumerate List<> & remove unwanted elements?
- From: Mr. Arnold
- Re: best way to enumerate List<> & remove unwanted elements?
- From: Peter Duniho
- Re: best way to enumerate List<> & remove unwanted elements?
- From: Mr. Arnold
- Re: best way to enumerate List<> & remove unwanted elements?
- From: Peter Duniho
- Re: best way to enumerate List<> & remove unwanted elements?
- From: Mr. Arnold
- Re: best way to enumerate List<> & remove unwanted elements?
- From: Peter Duniho
- Re: best way to enumerate List<> & remove unwanted elements?
- From: Mr. Arnold
- Re: best way to enumerate List<> & remove unwanted elements?
- From: Peter Duniho
- Re: best way to enumerate List<> & remove unwanted elements?
- From: Zytan
- Re: best way to enumerate List<> & remove unwanted elements?
- From: Mr. Arnold
- best way to enumerate List<> & remove unwanted elements?
- Prev by Date: Re: Static, ReadOnly/Const array in a method
- Next by Date: Passing XML as a parameter to a WS.
- Previous by thread: Re: best way to enumerate List<> & remove unwanted elements?
- Next by thread: Re: best way to enumerate List<> & remove unwanted elements?
- Index(es):
Relevant Pages
|