Re: RFC: Breaking existing Euphoria functionality

new topic     » goto parent     » topic index » view thread      » older message » newer message

Pete Lomax wrote:

> PS Andy Serpa seems to say replace the operator inside if statements, which
> imao is clearly wrong.

I am not suggesting changing the "if" statement at all, but to add new
comparison operators to the language (operators that always return a boolean, no
matter what is being compared, just equivalents for the compare() function as I
illustrated a few posts back), which can be used anywhere.  I certainly don't
want to break code, or take away existing functionality.  The ability to do "a =
b" (or "a < b" or "a * b", etc) with sequences and get a sequence back is at the
very core of the language -- the thing that makes it "Euphorian".

Most of these suggestions seem madness to me -- it seems people are desperate
for some reason to do this:

if a < b then...

when a and b are sequences.  I'm suggesting we do this:

if a :< b then...

which would be equivalent to:

if compare(a,b) < 0 then...

What could be simpler?  And the new operators could be used outside of "if"
statements as well in any expression, which personally I'd find useful.  And the
old operators would function just as they always have.  What is problematic about
it?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu