Re: RFC: Breaking existing Euphoria functionality
- Posted by Andy Serpa <ac at onehorseshy.com> Feb 23, 2007
- 561 views
Aren't we really just talking about making an operator alias for the compare() function? I mean, we CAN compare sequences in "if" statements now, correct? This is all about not getting to type what you want to type? (i.e. I don't want to type "compare(a,b)", I want to type "a < b" instead.) So just make some new operators (that work in "if" statements and elsewhere too) that only do comparisons -- add a colon prefix to them, for instance: a := b equivalent to "compare(a,b) = 0" a :< b equivalent to "compare(a,b) < 0" a :> b equivalent to "compare(a,b) > 0" a :<= b equivalent to "compare(a,b) <= 0" a :>= b equivalent to "compare(a,b) >= 0"