From: gabriele renzi Date: 2004-04-26T17:29:04+09:00 Subject: Re: RCR: Comparing multiple values il Mon, 26 Apr 2004 08:39:26 +0200, Szymon Drejewicz ha scritto:: >Kristof Bastiaensen wrote: > >> wouldn't it be nice to be able to compare multiple values? >> for example: >> x, y == 1, 2 >> #equivalent to x == 1 && y == 2 > >For me that notation has one drawback: what should happend if > y = 5 >and you'll write > [x, y == 1, 2] >? > >Is it an array with three elements > [x, false, 2] >? > >or an array with one element which has value of "multiple comaprision" > [false] >? It should be just 'false', as expressed in the first message (i.e. x==1 and 5==2) I mean, if we consider ',' as an expression that creates a list object, than 1,2 == could be just some kind of sugar. But chosing some kind of precedence would probably be impossible, or wqould break many of the actual behaviours.