On 9/6/05, Damian Conway <[EMAIL PROTECTED]> wrote:
> Luke wrote:
>
> > Yeah. Hmm, but I kinda like the look of ?? //, and I don't like the
> > overloading of :: in that way anymore. So it's possible just to add
> > a ternary ?? // in addition to, and unrelated to (from the parser's
> > perspective), the regular //.
>
> Bad idea. This useful construct would then be ambiguous:
>
> $val = some_cond()
> ?? $arg1 // $arg1_default
> // $arg2 // $arg2_default;
Huh, yeah. We'd have to go one way or the other on that, and neither
of those are what you intend.
Not that being explicit is always a bad thing:
$val = some_cond()
?? ($arg1 // $arg1_default)
// ($arg2 // $arg2_default)
And I question your notion of "highly useful" in this case. Still, it
is probably linguistically not a good idea to overload // like that.
>
> > ?? !! ain't bad either.
>
> It's definitely much better that sabotaging the (highly useful) // operator
> within (highly useful) ternaries.
I guess the thing that I really think is nice is getting :: out of
that role and into the type-only domain.
Luke