Case Range Statement ..
Walter Bright
newshound1 at digitalmars.com
Tue Jul 7 20:29:40 PDT 2009
Michel Fortin wrote:
> Solving both
> together is a little more worth it, but enought to warant a language
> feature, I have some doubths.
I'm fairly convinced it is not worth a language feature. It looks good
in the abstract, but is useless in practice. I write loops every day,
and I can't recall ever having a need for it.
Sometimes I run across someone else's code that does:
for (i = 0; i <= 10; i++)
{
... array[i] ...
}
and I'll always rewrite it as i<11, because the former confuses my brain
into creating bugs.
D has a lot of features. We should be parsimonious with new ones in that
they should offer a convincing big payoff, not merely a miniscule
hypothetical one.
More information about the Digitalmars-d
mailing list