I don't think that's an answer to my comment. Was it intended to be?

lgodio wrote that they wanted ternary operators, but were not
advocating that it be possible to allow nested ternary operations. I
don't see how this is possible if you write the grammar as the only
sensible interpretation

TernExpr = Expression "?" Expression ":" Expression .

Given that TernExpr would be an Expression.

The only way out of the natural possibility of having nested ternary
operator expressions would be a special case

TernExpr = NonTernExpr "?" NonTernExpr ":" NonTernExpr .

Which would then need documentation to explain it, and numerous posts here 
complaining about this weird edge case and how they should be allowed to write 
code however they want.



On Wed, 2019-04-24 at 18:40 -0700, Michael Jones wrote:
> switch test {
> case true:
>   //..code block for test=true
> case false:
>   //..code block for test=false
> }
> 
> On Wed, Apr 24, 2019 at 4:42 PM Dan Kortschak <d...@kortschak.io>
> wrote:
> 
> > 
> > How would you preclude it?
> > 
> > On Wed, 2019-04-24 at 16:28 -0700, lgod...@gmail.com wrote:
> > > 
> > > I am NOT in favor of allowing nested ternary operations
> > --
> > You received this message because you are subscribed to the Google
> > Groups
> > "golang-nuts" group.
> > To unsubscribe from this group and stop receiving emails from it,
> > send an
> > email to golang-nuts+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> > 
> -- 
> 
> *Michael T. jonesmichael.jo...@gmail.com <michael.jo...@gmail.com>*
> 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to