On 6/11/07, Jonathan Lang <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:
> Besides ?? !! with out an else part is just &&.

No, it isn't.  While && behaves properly when the condition turns out
to be true, the result of the condition turning out to be false is
whatever the condition turned out to be.

Still, Damian has a good point - which renders the bulk of this
discussion moot.  The one thing left to consider (IMHO) is whether or
not it's worthwhile (or even possible) to go back to '$c ? $t : $f' or
to '$c ? $t ! $f'.  As I said, the primary concern originally
expressed about the Perl 5 syntax involved matters of ambiguity which
seem to have been resolved since then.  A case could be made that if
the Perl 5 syntax for this doesn't clash with the rest of Perl 6, it
should be used: anything else would be change for change's sake.

First, don't consider it a change.  We're making a new language, not
modding Perl 5.

But I think there's a very good, if obvious, reason to change ? : to
?? !!.  ? : is simply too small for the behavior of this construct.
The ternary conditional is control flow, I'd say moreso than && and
||.  It should stand out; it's one of the more important things in a
sentence.  It also has a nice pseudosymmetry with && and ||, what with
its doubled characters.

But we seem to be missing the junctional ternary conditional "? !" :-p

Luke

Reply via email to