-
Notifications
You must be signed in to change notification settings - Fork 107
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
box types not named consistently #220
Comments
Hi Juile, thanks for the feedback! For the subclasses first, the issue with that is you can have multiple types of boxes at once. For example can have a default dots box. So while it would be cleaner and probably even faster, it would require a lot of subclasses to achieve all combinations, i.e. DefaultDotsBox, DefaultCamelKillerDotsBox, etc... For the naming suggestions, I agree what you suggest is cleaner. The minimal concern I have for the transition period is that people that use it now might use the reversal as a record in their own Boxes to check it's type somehow. For example if they do The name changes will have to be changes between major versions, so would target this for Box 7 with full switch with Box 8. |
I think I get it now. If I just replace the word "type" with "feature" then the parameters to the constructor just enable additional features for a Box. Given that they are parameters to Box, the features don't need box in the name. Box(dots=True, default=True), etc. |
You are correct with the "feature" mindset, and same is true with not needing the As the idea is for Box to be as close to a |
I understand your point. A user can write
However I can't imagine why anyone would write
when this is more compact and more understandable, and probably more efficient.
|
I've thought about this some more with the upcoming Box 7 release, and I simply can't justify so many people making these updates to just for a cleaner overall naming convention. I may be swayed in the future, but it's not something I am comfortable doing at this point. Don't want to cause another |
I always prefer class/type naming to be "adjective noun" as opposed to "noun adjective", which some prefer because filenames group together. "Adjective noun" matches normal speech, such as "hand me the blue pen".
When I first looked at box types I had to take time to understand what they meant, because my first reaction what "what is different to name one camel_killer_box and another box_dots".
I suggest that names be change to:
and allow previous names as synonyms for a time, marked with a deprecated warning.
However, I wonder why you didn't subclass box instead. You are calling the above type arguments.
Sub-classing Box would also have the benefit of
Would you accept a pull request for this?
The text was updated successfully, but these errors were encountered: