Skip to content

Consider replacing some member functions and operators with free functions #87

@Pharap

Description

@Pharap

Following the current style of not defining functions inside the main body of the class, this would mean that there would be fewer member functions kept inside the class.

This is considered 'breaking' because technically someone could be doing (for example) fixed.operator+=(value) somewhere in their code, which would break when operator+= is no longer a member function.

Anyone using the form fixed += value would be unaffected, and the fact that the vast majority of people are likely to be doing this is precisely why I have little concern about making this change.

However I will schedule this for the next 'breaking' change anyway, as a precaution. This change is more of an internal benefit than an external benefit, so it will most likely go unnoticed for the end user.

Typically there are other benefits associated with using free functions rather than member functions, but the primary driving force behind this change is the improved maintainability.

Metadata

Metadata

Assignees

Labels

MajorThis change is a major breaking changeQualityThis change improves the code's quality

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions