[Docs] Mojo style guide for value parameters #2557
Labels
documentation
Improvements or additions to documentation
mojo-repo
Tag all issues with this label
mojo-stdlib
Tag for issues related to standard library
Where is the problem?
https://github.com/modularml/mojo/blob/4d0b45f74fbcf883c63603a762b0c5c3a11895ed/stdlib/docs/style-guide.md#code-conventions
What can we do better?
Moving a discord discussion to a Github issue here:
I noticed that the style guide (https://github.com/modularml/mojo/blob/4d0b45f74fbcf883c63603a762b0c5c3a11895ed/stdlib/docs/style-guide.md) Is recommending PascalCase for parameters that are values:
(not to be confused with type parameter
Action: Actionable
which I agree should be PascalCase).To be honest, I wasn't really doing this for values and it is really confusing with Types and Structs in my opinion.
I also noticed the stdlib isn't following this in most of the cases, and even the docstrings example a couple of lines further of the style guide isn't.
The discussion also included other arguments (some of them listed below):
My natural feeling is to use
snake_case
for these all of these cases. And the stdlib seems to be following this trend. Although the style-guide is merely a recommendation. I would greatly appreciate it to have the community on the same line for this.The text was updated successfully, but these errors were encountered: