Re: Go ahead. Stop programming. This ensures you from any mistakes.
- From: "Jon Skeet [C# MVP]" <skeet@xxxxxxxxx>
- Date: Fri, 08 Jun 2007 05:35:48 -0700
On Jun 8, 1:16 pm, "valentin tihomirov" <V_tihomi...@xxxxxxx> wrote:
<snip>
Rearranging code always can yeild errors. Does this argument give me power
to infer arbitrary rules?
I was just giving you the reasons the language designers gave.
Personally, I don't have a problem with it - I find it tends to make
the code more readable to give the variables different names in this
kind of case anyway. I can't say it's bothered me that often - it's
hardly a straitjacket, is it?
I suspect that when working with C, I ran into more times when I
forgot to include the break than times when I deliberately wanted to
fall through.
I suppose that the first thing the programmers should know is the sequence
of instruction execution.
It's not a matter of knowing the rules, it's a matter of whether the
rules let you easily make mistakes.
Every time I forgot to put a break in, it was a simple matter of
forgetfulness, not a failure to understand what the code would do.
No, this won't prevent every mistake. Yes, it prevents certain ways of
working. However, I believe it helps more than it hinders, which is
why I'm in favour of it.
Regarding your change of subject line, I would retort: "Go ahead. Stop
using C#. That will stop you from being hindered by its rules."
Seriously, if you dislike so many design decisions of a language, why
use it?
Jon
.
- 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
- already used in a 'child' scope to denote something else
- Prev by Date: Go ahead. Stop programming. This ensures you from any mistakes.
- Next by Date: Re: Difference, == and Object.Equals
- Previous by thread: 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):