DIP32: Uniform tuple syntax

kenji hara k.hara.pg at gmail.com
Fri Mar 29 08:48:52 PDT 2013


2013/3/30 Timon Gehr <timon.gehr at gmx.ch>

> eg. Haskell does not have it. (but it has pattern guards)
>
> Another thing, what do you do if there are multiple matching patterns in a
> switch?:
>
> final switch({1,2}){
>     case {1,y}: ...; break;
>     case {x,2}: ...; break;
>     default: ...; break;
> }
>

The patterns should be tested in lexical order.

Kenji Hara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130330/492596fd/attachment.html>


More information about the Digitalmars-d mailing list