Re: Go ahead. Stop programming. This ensures you from any mistakes.
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Sat, 9 Jun 2007 19:15:31 +0100
valentin tihomirov <V_tihomirov@xxxxxxx> wrote:
Right - and likewise, the only way it seems that you'll stop being
cross about things that C# stops you from doing is to stop using C#.
.. and invent my own language+OS and ... if aI do not like the decisions
made by men in power.
Yes, it's a silly idea - just like your suggestion of "Stop
programming" is, IMO. That was my point.
Well, I'm sure I'm not the only one who's been bitten by accidental
fallthrough in switch statements in C. As I said, I would prefer a more
radical overhaul of switch/case, but I'd rather have what we've got
than a version which has all the ugliness of the current version but
with the added problem of fallthrough.
If you were bitten for omitting a statement, it does not mean that this
statememt must be incorporated into the grammar.
It suggests that it wouldn't be a bad idea. I like ideas that mean I
make fewer mistakes, if they don't constrain me too much - and
disallowing fallthrough has hardly ever constrained me at all.
As Ben pointed out, you can always use goto case if you really want the
effect of fallthrough.
Would you like to have the effect to a series of your program statements by
emulating the "fallthrough" by explicit goto after every statement? As Bob
http://www.bobcongdon.net/blog/2003/12/c-switch-statement.html points it
out, C# designers should introduce a "safe" must-break-switch rather than
"improving" the switch by disallowing fall-through and then adding the goto
junk.
So then you really wouldn't be able to do what you want *at all*. How
is that better for you? If you don't like using the "goto" then just
don't - I know I don't.
I really don't care that much whether C# allows the use of "goto" or
not, given that I don't use it - but it seems odd to complain that the
language doesn't let you do something, and then complain that you can
do it but you don't happen to like the syntax.
--
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: Go ahead. Stop programming. This ensures you from any mistakes.
- From: valentin tihomirov
- Re: Go ahead. Stop programming. This ensures you from any mistakes.
- References:
- already used in a 'child' scope to denote something else
- From: valentin tihomirov
- Re: already used in a 'child' scope to denote something else
- From: Jon Skeet [C# MVP]
- Go ahead. Stop programming. This ensures you from any mistakes.
- From: valentin tihomirov
- Re: Go ahead. Stop programming. This ensures you from any mistakes.
- From: Jon Skeet [C# MVP]
- Re: Go ahead. Stop programming. This ensures you from any mistakes.
- From: valentin tihomirov
- Re: Go ahead. Stop programming. This ensures you from any mistakes.
- From: Jon Skeet [C# MVP]
- Re: Go ahead. Stop programming. This ensures you from any mistakes.
- From: valentin tihomirov
- Re: Go ahead. Stop programming. This ensures you from any mistakes.
- From: Jon Skeet [C# MVP]
- Re: Go ahead. Stop programming. This ensures you from any mistakes.
- From: valentin tihomirov
- already used in a 'child' scope to denote something else
- Prev by Date: Namespace exploring with XmlDocument
- Next by Date: Re: Go ahead. Stop programming. This ensures you from any mistakes.
- Previous by thread: Re: Go ahead. Stop programming. This ensures you from any mistakes.
- Next by thread: Re: Go ahead. Stop programming. This ensures you from any mistakes.
- Index(es):
Relevant Pages
|