Yes was only a draft idea, but pattern matching proposal does the job El El mié, 20 feb. 2019 a las 22:29, Waldemar Horwat <[email protected]> escribió:
> On 02/15/2019 08:02 PM, Juan Pablo Garcia wrote: > > I think it would be great if the switch statement allows multiple > argument > > > > Example > > Switch(a,b) > > Case: 1,true > > Case: 1,false > > Case: 2,true > > .... > > You need braces for the switch statement, and the colon goes after the > expression; I assume you meant "case 1, true:"? > > The syntax wouldn't work for the simple reason that the language already > defines that syntax and it does something else. switch(a,b) evaluates a > for its side effect and then switches on b. The same goes for the case > expressions. > > Waldemar >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

