Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/website: Misleading statement in FAQ #33809

Closed
elliottpolk opened this issue Aug 23, 2019 · 2 comments
Closed

x/website: Misleading statement in FAQ #33809

elliottpolk opened this issue Aug 23, 2019 · 2 comments
Milestone

Comments

@elliottpolk
Copy link

@elliottpolk elliottpolk commented Aug 23, 2019

The FAQ currently states

A language needs only one conditional control flow construct.

Go currently has multiple conditional flows, if-else, switch-case, and (?) select-case. This can be potentially problematic for the argument against a ternary operator.

@gopherbot gopherbot added this to the Unreleased milestone Aug 23, 2019
@ALTree
Copy link
Member

@ALTree ALTree commented Aug 24, 2019

The switch statement has the type-switching support which is not easily replicable by other means and the select has the whole blocking stuff, they both serve their purpose. Ternary, on the other hand, is literally the same thing as an if-else but with another syntax. That's the point the FAQ is trying to make.

Closing here, since I think the current wording is fine.

@ALTree ALTree closed this Aug 24, 2019
@elliottpolk
Copy link
Author

@elliottpolk elliottpolk commented Aug 25, 2019

The point it's trying to make is valid. The mechanism in which it's making said point isn't. Stating it only needs one of something when it clearly has at least 3 invalidates the argument.

@golang golang locked and limited conversation to collaborators Aug 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.