cdgriffith / cdgriffith/Box

box types not named consistently

Open
#220 6 comments 0 reactions 0 assignees View on GitHub
enhancement wontfix
Dominant language
Python
Stars
2.8k
Forks
135
PR merge metrics
No merged PRs in 30d

Description

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:
- conversion_box
- default_box
- dots_box
- camel_killer_box
- frozen_box
- recast_box
- intact_types_box
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
- making it more explicit that it is a different type with some additional behavior
- allow parameters specific to the sub-class to be specific to the __init__ for that class
- it is clear from the documentation that supplemental box arguments are specific to the type of box

Would you accept a pull request for this?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.