On Sun, Aug 06, 2000 at 04:40:29AM +1000, Damian Conway wrote: > > Oh, the table thing. The switch statement is useful without learning the > > complete table so I don't think complexity is a big problem. People can > > learn what they need and ignore the rest. I agree with you that it might > > be nice to have an array membership operator (like "in") so that you can > > write: > > > > if ($x in [ 1, 2, 3 ]) ... > > if ( grep $x==$_, (1,2,3) ) ... > > Be nice if it would short-circuit in a boolean context though! I think we need a general way of short-circuiting out of a grep (and other list iterating funcs, if it makes sense...) We may need both success and failure short-circuits? It's a pity 'last' already has semantics there, not to mention return... > Damian -- $jhi++; # http://www.iki.fi/jhi/ # There is this special biologist word we use for 'stable'. # It is 'dead'. -- Jack Cohen
- Re: RFC 22 (v1) Builtin switch statement Glenn Linderman
- Re: RFC 22 (v1) Builtin switch statement Damian Conway
- Re: RFC 22 (v1) Builtin switch statement Glenn Linderman
- Re: RFC 22 (v1) Builtin switch statement Ken Fox
- Re: RFC 22 (v1) Builtin switch statement Glenn Linderman
- Re: RFC 22 (v1) Builtin switch statem... Jeremy Howard
- Re: RFC 22 (v1) Builtin switch statem... Ken Fox
- Re: RFC 22 (v1) Builtin switch statem... Damian Conway
- Re: RFC 22 (v1) Builtin switch s... Jarkko Hietaniemi
- Re: RFC 22 (v1) Builtin swit... Chaim Frenkel
- Re: RFC 22 (v1) Builtin switch s... Chaim Frenkel
- Re: RFC 22 (v1) Builtin switch statement Damian Conway
- ConwayPerl (was Re: RFC 22 (v1) Builtin switc... Jeremy Howard
- Re: RFC 22 (v1) Builtin switch statement Bart Lateur
- RE: RFC 22 (v1) Builtin switch statement Lipscomb, Al
- RE: RFC 22 (v1) Builtin switch statement Damian Conway
- Re: RFC 22 (v1) Builtin switch statement Jonathan Scott Duff
- Re: RFC 22 (v1) Builtin switch statement Glenn Linderman
- Re: RFC 22 (v1) Builtin switch statement Damian Conway