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

Reply via email to