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

language: math symbols in identifier #41707

Closed
ghost opened this issue Sep 30, 2020 · 3 comments
Closed

language: math symbols in identifier #41707

ghost opened this issue Sep 30, 2020 · 3 comments

Comments

@ghost
Copy link

@ghost ghost commented Sep 30, 2020

why math symbols like , can't be used as identifier?

@cespare
Copy link
Contributor

@cespare cespare commented Sep 30, 2020

Go only allows letters and digits in identifiers. ∇ and √ are Unicode math symbols (category Sm) and therefore are not allowed.

See https://github.com/golang/go/wiki/Questions for asking general questions about Go. Thanks!

@cespare cespare closed this Sep 30, 2020
@ghost
Copy link
Author

@ghost ghost commented Sep 30, 2020

∇ and √ are Unicode math symbols (category Sm) and therefore are not allowed.

What is the reason for it?

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Sep 30, 2020

Please see https://golang.org/wiki/Questions. Thanks.

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

Successfully merging a pull request may close this issue.

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