On Apr 26, 2019, at 2:12 AM, Mike Schinkel <m...@newclarity.net> wrote:
> 
> Given that, I am curious what your thoughts would be if this were possible in 
> Go instead?
>  
>    color := if temperature > 80 then “red” else “green” 
> 
> And especially if this formatting were valid:
> 
>    color := if temperature > 80 
>       then “red” 
>       else “green” 

That is pretty close to how Python added a ternary operator:

foo = bar if a==b else baz

More Pythonic, but same potential for abuse (no one is gonna stop you from 
nesting expressions).


- Dave

-- 
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