DIP32: Uniform tuple syntax
Jacob Carlborg via Digitalmars-d
digitalmars-d at puremagic.com
Thu Aug 14 23:23:30 PDT 2014
On 14/08/14 21:12, bearophile wrote:
> Elsewhere I have suggested to add to D an optional struct (and tuple)
> method now named onMatch, similar to the unapply method of Scala
> language, that is also called by the switch case to perform a basic
> version of pattern matching.
It can be implemented as a library function. The syntax won't be as nice
looking tough. With AST macros the syntax could probably look good enough.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list