Pattern matching in D?

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Thu Oct 20 19:40:45 PDT 2016


On Friday, 21 October 2016 at 02:16:44 UTC, Chris M. wrote:
> So I know you can do some pattern matching with templates in D, 
> but has there been any discussion about implementing it as a 
> language feature, maybe something similar to Rust's match 
> keyword (https://doc.rust-lang.org/stable/book/patterns.html)? 
> What would your guys' thoughts be?

How is this diffrent from "switch-case" ?


More information about the Digitalmars-d mailing list