Andrei Alexandrescu Wrote:

> Usually you're 
> all for adding features (hey, you just brought up the switch again! 
> isn't that ironic?) and cleaning up bad parts of the language,

Sorry, I'm not a computer scientist, and surely I am not a language designer 
(especially for a C++-class language), so you may see some contradictions in 
what I sometimes say :-)

I have brought up the switch again because I was nervous, after spending some 
time to find a bug caused by the current design of the switch.

There are classes of bugs that aren't easy to avoid, but I think with a less 
bug-prone switch I may avoid bugs like the one I have removed from my code.
One of the most basic part of the Zen of D is to help programmers to avoid 
bugs, where possible.

I hate the idea of having 3 different switches in the language (that's why I 
was not happy to see the static switch, because a better redesign of the 
*second* switch was in order). But the current situation of switch is not good 
for D yet.

Bye,
bearophile

Reply via email to