switch()

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Feb 17 07:54:58 PST 2014


On 2/17/14, 7:42 AM, Daniel Murphy wrote:
>
> "Manu" <turkeyman at gmail.com> wrote in message
> news:mailman.156.1392649746.6445.digitalmars-d at puremagic.com...
>
>> I agree, to an extent. That's why I say if it is to be improved, I
>> guess it needs a new
>> name.
>> foreach eliminated almost all instances of for. I don't think anyone's
>> upset about
>> that.
>
> Exactly, foreach is a new, better language construct, but we didn't
> butcher for.  I would love to see a nice solid proposal for 'match'.

A "match" statement that figures type patterns and introduce names and 
all that - that might be more interesting (though being far from a game 
changer). But that's not quite what has been proposed in this thread.

Andrei



More information about the Digitalmars-d mailing list