The difference is that the ternary operator is an expression and the if...else is a statement. If you're only suggesting a syntax change, then the difference becomes one of readability.
I'll ask again, how would you preclude nesting without making the language more complex? On Thu, 2019-04-25 at 13:38 -0700, lgod...@gmail.com wrote: > Rob: > > Am I missing something ?? > The proposed syntax > test ? { > } : { > } > > with no-nesting allowed is equivalent to > if test { > //..... > } else { > // .. > } > ..The former is just a cleaner way of writing the latter > > Any complaints regarding 'abuse' associated with the former equally > apply > to the latter > > On Thursday, April 25, 2019 at 11:47:21 AM UTC-4, Rob 'Commander' > Pike > wrote: > > > > > > I am pretty sure that the decision not to have ?: in Go was a > > unanimous > > decision by Robert, Ken and myself after almost no discussion. It > > is too > > easy to abuse, as the FAQ states. > > > > -rob > > > > -- 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.