The one use-case ternaries would have in go is assigning a conditional value to a read-only variable. Given the overall ethos of Go programming, however, that very use-case would be more of a code smell than anything else. So ultimately ternaries are just syntactic sugar with more drawbacks than benefits from a language design POV.
However, Go has its fair share of syntactic sugar already (e.g. optional return, and defer), so it's questionable whether that alone should be an argument against ternaries. Though I do tend to agree that it shouldn't make it into the syntax.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The one use-case ternaries would have in go is assigning a conditional value to a read-only variable. Given the overall ethos of Go programming, however, that very use-case would be more of a code smell than anything else. So ultimately ternaries are just syntactic sugar with more drawbacks than benefits from a language design POV.
However, Go has its fair share of syntactic sugar already (e.g. optional return, and defer), so it's questionable whether that alone should be an argument against ternaries. Though I do tend to agree that it shouldn't make it into the syntax.