Skip to content

Conversation

@martinwilkerson-scisys
Copy link
Contributor

@martinwilkerson-scisys martinwilkerson-scisys commented Jun 6, 2018

The previous note could be read as a mistyped 2 element list - that goto statements are valid for the constant pattern and the classic switch statement. Changing the comma to parentheses makes it clear that 'the classic switch statement' is to clarify 'the constant pattern' rather than be an alternative to it.

Summary

Changed the note describing when gotos are valid in switches to reduce ambiguity. The original form could have been read as gotos being valid for the constant pattern and the classic switch statement, given a not unreasonable assumption that the comma could have been a typo for 'and'. Putting 'the classic switch statement' in parentheses makes it clearer that it's an aside to clarify the original statement.

Of course, I might have misunderstood entirely and the correct change would be to replace the comma with 'and'...

The previous note could be read as a mistyped 2 element list - that goto statements are valid for the constant pattern and the classic switch statement. Changing the comma to parentheses makes it clear that 'the classic switch statement' is to clarify 'the constant pattern' rather than be an alternative to it.
@BillWagner BillWagner added the ✨ 1st-time docs contributor! Indicates PRs from new contributors to the docs repository label Jun 7, 2018
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good clarifying change @martinwilkerson-scisys

Thanks for contributing to docs, we appreciate it.

I've reviewed the change, and I'll :shipit: now. You should see the change on the live site in the next day or two on our regular publishing cycle.

@BillWagner BillWagner merged commit 92b1944 into dotnet:master Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ 1st-time docs contributor! Indicates PRs from new contributors to the docs repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants