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

Don't require a key for {@select} #123

Closed
sethkinast opened this issue Mar 19, 2015 · 5 comments · Fixed by #133
Closed

Don't require a key for {@select} #123

sethkinast opened this issue Mar 19, 2015 · 5 comments · Fixed by #133
Milestone

Comments

@sethkinast
Copy link
Contributor

Based on http://stackoverflow.com/a/29151097/938516

If you have to do truth tests on several variables but you want to group the tests for the purposes of any / none / default it's a little more readable to attach variables directly to their truth tests.

If we made this change, though, it moves even further away from the semantics of select-as-switch. Select basically becomes a "grouped truth test".

Any thoughts?

@rragan
Copy link
Contributor

rragan commented Mar 19, 2015

I recall suggesting this omission back when the @or variant was under discussions. Too bad we have the @select legacy meaning. Simple alias of @or?

@jimmyhchan
Copy link
Contributor

(aside)FYI, the @'s are mentions referring to github individuals. Please use the back ticked at instead.(aside)

@sethkinast
Copy link
Contributor Author

I don't like adding a new tag that's just an alias-- that seems to bloat the API.

If we were changing the semantics of select, I could definitely see introducing a new tag and deprecating the old one, but it's really just relaxing a restriction.

If that's weird, I'm totally OK saying that you just have to have a key :)

@rragan
Copy link
Contributor

rragan commented Mar 19, 2015

I'm ok keeping it with select and making the optional

@prashn64
Copy link
Contributor

I agree with this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants