Struct names conventions #259
josecelano
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sometimes I use the mod namespace to improve the readability, for example:
Notice the
peer::Id
and I would probably use theEntry
withtorrent::Entry
.But It seems the automatically generated crate documentation (with
cargo doc
) removes the namespaces:so from my point of view, you can not rely on namespaces to improve readability because docs would not take advantage of that technique.
Should we stop using the namespace as a prefix @da2ce7 @WarmBeer ? For example:
If we do so, we have a problem with Clippy, we would have to extra the PeerId into its mod otherwise, it would complain because the struct has the same prefix as the mod name.
I'm used to one-class-one-file organization that other languages impose on you or because they have community conventions.
Beta Was this translation helpful? Give feedback.
All reactions