On 2015-10-25 19:23, Dmitry Olshansky wrote:
I humbly believe that D may just add special re-write rule to the switch statement in order to allow user-defined switchable types. This goes along nicely with the trend - e.g. foreach statement works with anything having static range interfaces or opApply.
Do you think that could handle all different type of patterns? For example extractor patterns:
match x {
case Foo(bar) => println(bar)
}
The above is Scala.
--
/Jacob Carlborg
