Re: Updated EPP

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

EU>I meant in general so you could define an infix operator for any function.

EU>You'd also need something to define its precedence.

EU>Postfix stuff would be cool also, then you could do stuff like:

EU>if x is_prime then

EU>instead of:

EU>if is_prime(x) then

Great idea. I'll also allow programs to define custom operators so you
could have:

function mod(object a, object b)
        return remainder(a,b)
end function

setOperator("%",routine_id("mod"))

if 5 % 2 then
...

Jeffrey Fielding
JJProg at cyberbury.net

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

Search



Quick Links

User menu

Not signed in.

Misc Menu