Replies: 2 comments 2 replies
-
Suggestion to 14. For methods which perform work, it's better not to use |
Beta Was this translation helpful? Give feedback.
1 reply
-
@bobbinth should we use this discussion to figure out the coding guidelines for all repos? Here are some of the previous discussions that I know about:
@bitwalker @plafer @greenhat @polydez I suppose you guys will want to share your POV too. |
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
-
Here is an initial list of coding style guidelines we use. Probably some things are missing but we can add on to this list as the time goes on. Also, these are just general rules. It is OK to deviate from these when this improves code readability. And obviously, happy to discuss any of these.
tests
module.tests
module can be in the same file as its parent. Otherwise, we move tests into a separate file under the same module.=
).-
) for section separators within structs.super
.id
is a property ofFoo
, usefoo.id()
rather thanfoo.get_id()
.get_
,build_
etc.). For example,foo.get_hash()
if hash is being computed insideget_hash()
.Beta Was this translation helpful? Give feedback.
All reactions