Sat, 05 Dec 2009 20:03:28 -0500, Nick Sabalausky wrote: > "grauzone" <[email protected]> wrote in message > news:[email protected]... >> Nick Sabalausky wrote: >>> "Ellery Newcomer" <[email protected]> wrote in message >>>> It's a useful divergence. It's a feature that should exist. But I >>>> contend it makes more sense to make a new construct which *is* >>>> equivalent to a certain pattern of nested ifs (switch isn't) and >>>> incorporate your feature into that than to shoehorn it into switch. >>> >>> I definitely agree we need a new switch that isn't so stuck in C-land. >>> And if we got it, I'd be perfectly happy to restrict all the new stuff >>> to the newer switch and just let C-style switch atrophy into oblivion. >>> But a new switch just doesn't seem to be happening :(. >> >> You'd still need to keep around the old switch for stuff like Duff's >> Device. But I agree that it'd be nice to have a new switch for the >> following reasons: could use pattern matching instead of just a list of >> values, no redundant "case", no fallthrough by default, allow a more >> functional programming style. > > I have to admit, I'm so jealous of what I've seen of Nemerle's pattern > matching (and it's metaprogramming), that I've been tempted to to give a > shot at switching to it for things that don't strickly need system-level > capabilities.
I sense words of heresy! TBH pattern matching is pretty nice. But given the amount of time we have left before D2 is out, I don't really expect anything to change anymore. D3 might not be ever released if D2 fails. And I somehow can't see the D community embracing the functional programming paradigm.
