Henry Padilla said:
I never meant to suggest that this was good, bad, or indifferent. There is
no reason to get defensive, I'm not attacking anything.
Well, look at your previous posts and you might see why I was under
that impression. Things like:
<quote>
I thought this was pretty well accepted in the programming community at
large
</quote>
and
<quote>
This is quite a simple opperation in C/C++And don't see why it needs to
be complicated.
</quote>
suggested to me that you preferred the C/C++ way of doing things, and
hadn't understood the problem with it.
Larry himself has apologized for the tone of the post and was quite helpful
afterwards. I am asking questions TO learn. There was a particular manner
that I had done things and was trying to discover how that was accomplished
in C#. Just because I mentioned C/C++ doesn't make this an attack on C#'s
ability to accomplish my task. It establishes a basis for prior knowledge
and allows people like "Marc Gravell" (see above) to help from a common
ground. (he pointed out the same "!=0" bug you did but with much less
attitude and with an understanding that, as a bitmask the high-order bit has
every possibility of being set)
Whether it's being used as a bit-mask is irrelevant, IMO. If an int is
going to be treated as a boolean, it should be treated in the same way
whether it's a bitmask or the result of any other operation.
I did look at Larry's post in a constructive light and did, indeed, come to
understand what the reasoning might be behind a decision like this. I also,
being the subject of his ire at the time, felt the sting of comments made to
hurt. Why are you not more sensitive to this aspect of his post?
I've just reread both Larry's post and your reply to it - I still think
yours is the ruder one. I suggest you reread both and see if you
disagree. You are much more personally aggressive in yours.
And, in point of fact, no - I was not interested in "WHY" C# wishes to do
this. It's the syntax of the language and that's what I am using. There's
no need for me to dissertate on what may or may not have been going on that
made a decision final. It will not help me in the least and does nothing
for my situation.
I'm sorry you feel that way. I always find that if you try to
understand why a language designer made a decision in one particular
situation, that makes it easier to understand the general emphasis of
the language, and helps you to pick up the rest of the points of the
language. For instance, understanding that C# doesn't want you to make
the kind of mistakes which are often made in C/C++ might help you to
guess (and then check) that when you try to fall through from one bit
of code in a switch statement to the next switch case and the compiler
stops you from doing it, that's a deliberate choice and not just a typo
on your part. It might help you to guess that instance and class
variables which have not been explicitly initialised have a specified
default value rather than just getting potentially random garbage. It
might help you to understand why you can't use uninitialised local
variables. It's a bit like using foreign culture to help you pick up a
foreign language - the more you think in the language, the easier it is
to learn (whether a computer language or a natural language).
The hard fact is that C# acts like this, period. If I
don't can't get around this I'm not much of a programmer and need to find a
different language. (I do wish they would use a bit for a data type that
only has a bits worth of data in it but I'm sure there's a reason for that
too)
I'm sorry to have obviously offended you.
What offends me is people being rude to others who are trying to help
them. I've seen it time and time again on the newsgroups - admittedly
often with even less provocation than in this case.