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

Underscore nomenclature #16219

Closed
damon-kwok opened this issue Aug 10, 2020 · 5 comments
Closed

Underscore nomenclature #16219

damon-kwok opened this issue Aug 10, 2020 · 5 comments

Comments

@damon-kwok
Copy link

damon-kwok commented Aug 10, 2020

Use underscore nomenclature to replace variable and method names with littlecamel-case nomenclature.
The pony code on the right is more beautiful. See:

chapel_screenshot

@bradcray
Copy link
Member

Hi @damon-kwok — Would you clarify what you are proposing we do here in order to address and close this issue?

@damon-kwok
Copy link
Author

@bradcray If possible, add naming constraints to the chapel compiler.

@bradcray
Copy link
Member

It's possible, but not something I think we would turn on by default. Personally, at least, I'm not a big fan of having languages impose naming constraints, as I think it's something a project's authors should decide for themselves given that different programmers prefer different styles (obviously). Where things get trickier is with the standard libraries where, as you've probably seen, we've been using camelCase fairly consistently, and I think it would be too difficult/painful for users if we were to change now. So I suspect that the best bet here would be to have the compiler support style flags like --enforce-underscore-style or --enforce-camelCase-style that would be applied to all user modules (we also talk about other styles that one may want to enforce through compiler flags like "force me to give types to my procedure's arguments" or "force me to avoid using try!".

See also issues #6698 and #7417, which are related.

@damon-kwok
Copy link
Author

@bradcray Sound good! THANKS~

@bradcray
Copy link
Member

If you would like to open an issue specifically requesting such style-enforcement flags, please feel free to.

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

No branches or pull requests

2 participants