-
Notifications
You must be signed in to change notification settings - Fork 34
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
More guidelines on method names #36
Comments
Base actually has a style-guidance (that may or may not be written down) This is acceptable for Base, because Base only does things that are easy to describe,
There are 40 of them.
Bases guidelines of this as I said are acceptable for a core library that only does obvious tasks, most of which are given by 1 word. For normal packages, should actually just alwaus follow the guideline of
This is so rare that it doesn't bare mention in the style-guide, Adding rules that will apply to like <0.1% of all packages is just too much noise to signal for my liking. |
The recommendation here won't change, but is it worth adding another example to this section? e.g. # Yes:
is_green(g::Goblin) = ...
# No:
isgreen(g::Goblin) = ...
isGreen(g::Goblin) = ... |
The integration of a feature into base is just an example (perhaps a poor one). I think it's also important that a user doesn't need to know if a get, set, etc function is from base or another package. However, if what you're saying is that this is a sort of push for this type of syntax to transition into base then it makes sense to start out with that inconsistency. To be clear I'm not arguing that everything here be 100% consistent with base. I just think that user facing syntax that will strongly influence people who aren't developing packages needs to be consistent. |
Yes, lets add another example. |
Wow!!! I do totally agree with Stefan here! 🐍 case rules! |
Thanks for this wonderful guide! I wanted to ask if there could be slightly more clarification/modification concerning method names. Sep
It would be nice to have consistency with base when defining methods like
isimmutable
where readability isn't as much of an issue. This would be especially nice for cases where a package may have code that eventually moves to base or the standard library (however rare that may be).Potential solutions:
The text was updated successfully, but these errors were encountered: