Replies: 1 comment 1 reply
-
We are a member of the Python family, so following PEP8 is the right thing to do. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Maybe it is not so important, but actually does, what is the convention for naming in a languages?
Function/methods CamelCase/snake_case?
In the Python world, there are clear rules PEP8 about when to
use snake_case/CamelCase
. This makes the code elegant and easy to read.Definitely language should has built-in tools for format and lint code (
rustfmt/swiftformat
).The question is when to have such tools. We can wait a bit, it's not critical, even the community can write their own tools, but it can create some chaos. As with Python, there are many formatting tools (Black/pylint/yapf) and code guidelines (Google, PEP8, etc.).
With tools like
fmt
, a language can easily build and change its keywords, syntax, other things, and devs can easily reformat their code to accommodate the new changes without pain. Just like python2 smoothly migrates to python3 with 2to3.Open question is about "Zen of Mojo".
Beta Was this translation helpful? Give feedback.
All reactions