On Tue, Sep 06, 2005 at 07:26:37AM +1000, Damian Conway wrote:
> Thomas Sandlass wrote:
> >I'm still contemplating how to get rid of the :: in the
> >ternary 
> >
> >Comments?
> I believe that the single most important feature of the ternary operator is 
> that it is ternary. That is, unlike an if-else sequence, it's impossible to 
> leave out the "else" in a ternary operation. Splitting the ternary destroys 
> that vital characteristic, which would be a very bad outcome.

At OSCON I was also thinking that it'd be really nice to get rid of 
the :: in the ternary and it occurred to me that perhaps we could use
something like '?:' as the 'else' token instead:

   (cond) ??  (if_true) ?: (if_false)

However, I'll freely admit that I hadn't investigated much further
to see if this might cause other syntax ambiguities.


Reply via email to