2018. augusztus 15., szerda 16:46:51 UTC+2 időpontban Hoo Luu a következőt 
írta:
>
> 在 2018年8月15日星期三 UTC+8上午12:43:37,Mark Volkmann写道:
>
>> var color = temperature > 100 ? “red” : “blue”  
>
>  
> Although this feature will not be accepted, we could just talk about it. I 
> prefer 'if-expression'  to ternary.
>
> var color = if temperature > 100 { "red" } else { "blue" }
>
> vs. current if statement syntax:
>
> var color 
> if temperature > 100 {
>     color = "red"
> } else {
>     color = "blue"
> }
>

I prefer with nice clean unmissable "default vs. special"

color := "blue" 
if temperature > 100 {
    color = "red"
}
 

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