in reply to Ternary operator (there's no Trinary operator )

"Trinary" is Just Plain Wrong. Are operators taking two arguments called "binary" for that fact? No.
Binary ops deal with binary values (either at the boolean or bit-wise level). A trinary operator would deal with three-state values — for example, in a logic system that allows 0, 1, and undef/null.

"Tertiary" also doesn't make sense, since it means "third". Clearly, :? isn't "the third operator".

I guess that leaves "ternary" as the best — if not ideal — choice.

Update: D'oh!

We're building the house of the future together.
  • Comment on Re: Ternary operator (there's no Trinary operator )

Replies are listed 'Best First'.
Re^2: Ternary operator (there's no Trinary operator )
by Sidhekin (Priest) on Jul 19, 2006 at 18:21 UTC

    Are operators taking two arguments called "binary" for that fact? No.

    Uh, yes. Yes, they are.

    Just check perlop, if you don't believe me.

    Or, if you don't find the Perl documentation clear enough, check Wikipedia on binary operation: "an operation whose arity is two".

    (In my experience, operators dealing with binary values are commonly refered to as either boolean or bit operators.)

    print "Just another Perl ${\(trickster and hacker)},"
    The Sidhekin proves Sidhe did it!