Eliminate assert and lazy from D?
Craig Black
craigblack2 at cox.net
Tue Oct 13 16:41:45 PDT 2009
"bearophile" <bearophileHUGS at lycos.com> wrote in message
news:hb17v3$1e4r$1 at digitalmars.com...
> 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
Since it seems there are fundamental changes already going into D 2.0, I
agree with bearophile. I don't like the syntax of switch, which is based on
the old C switch syntax. Yuck! But I digress, this is not on topic.
-Craig
More information about the Digitalmars-d
mailing list