-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Make stateless BSFormatter functions static and remove dead code #3239
Make stateless BSFormatter functions static and remove dead code #3239
Conversation
I think this pr is too small :) making the method static is only useful if you really move the method. so to see if it makes sense the move needs to be in the same pr. |
I disagree. Reducing the public api of the BSFormatter instance is useful in itself as it makes it possible to see in the calling code if there is a dependency on hidden state or the function is stateless. Also removing dead code (there are a couple functions deleted that were never called) is also useful in itself, without a further commit required. Either way I will open another PR with the first move included. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for splitting that up. yet, I found another LOC I need you to change.
Other than that, I agree with both of you.
- christoph: the full advantages will only show once alle BSFormatter-Stuff is gone from the constructors. agreed.
- bodymindarts: reducing the API is useful as well as removing dead code. agreed.
nothing is perfect.
please refer the followup PR to this one and we are good.
Making these functions static is a preparation for extraction.
93e59ce
to
57d9bad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack.
Making these functions static is a preparation for extraction.
Reducing the public interface of the BSFormatter instances reduces coupling and enables moving these functions to places where it makes more sense for them to live.