in reply to Why not support this syntax?

Personally, I'd like to see something like
if ( $x in [$min, $max] ) { ... } #inclusive container, # $x==$min would be true # OR if ( $x in ($min, $max) ) { ... } #exclusive container, # $x==$min would be false # OR if ( $x in ($min, $max] ) { ... } #mixed ends
since, IMO, reads better than having consecutive '<'s or '>'s, but this also has similar parsing problems particularly in the mixed variety with balancing parans.
Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain

Replies are listed 'Best First'.
Re: Re: Why not support this syntax?
by MeowChow (Vicar) on Apr 24, 2001 at 07:59 UTC
    That would be nice as well, though it lacks the ability to succinctly express the following condition:
    if ($min < $x < $y <$max) { ... }
    The unbalanced braces would absolutely wreak havok on syntax highlighters, too.
       MeowChow                                   
                   s aamecha.s a..a\u$&owag.print