You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The development guide needs to be revisited to cover coding style. The Chebfun style guide is a decent place to start. I'm also partial toward the Python style guide.
How enamoured are we of the idea that things should be "matlab-like" in their behaviour? (Like in the discussion for #12.) Should we just move to the structure style syntax for class properties and away from the old style?
If there is a need for an external type property access -- I'm thinking in particular of the angle() method in the polygon class -- we just make sure the property has a different name (without my infamous trailing underscores). Thus polygon.angle_ might then be polygon.angleList or something. Then in the class methods if we're worried about variable and property name clashing, and some of us are because OCD, we can adopt a trailing underscore for a method variable.
I guess the bottom line is that I'm now sold on @tobydriscoll's initial suggestion that names exposed to the user as public properties shouldn't have underscores. I'm willing to dig through the code and get this sorted.
For name style (variable, method, class), I propose the following.
Variable/property names are all lower_case_with_underscores.
Class names are all lowercase.
Method names that get a lot of command line use should be short and all lowercase.
Method names used mainly internally by the classes are lowerCamelCase.
I generally like UpperCamelCase for class names, but class names here sometimes get a lot of command line use, so should probably be short and lower. I also like the idea of the lower_with_underscores for variable names, since it's easy to quickly distinguish them from method names, but maybe that's not so important in matlab.
The development guide needs to be revisited to cover coding style. The Chebfun style guide is a decent place to start. I'm also partial toward the Python style guide.
Existing issues this covers:
The text was updated successfully, but these errors were encountered: