Closed sbondorf closed 6 years ago
For the sake of completeness, there is more to be considered:
the enum entries in the minplus
package and CurveBackend*
also contian "AFFINE" suffixes (although they seem to fit your recommendation)
the classes in minplus.dnc.affine
should have an underscore and capital "A" according to the above mentioned recommendation instead of the current suffix
the classes in minplus.dnc.pwaffine
should be renamed
(minor: PwAffine
should be written with only one "i")
Thanks for completing and pointing out the typo. I had another look at the code but did not find any further occurrences that we need to adapt to this naming convention.
Regarding your recommendation, I would approve the convention.
However, as a sidenode, a prefix would increase the readability. E.g. Affine_ArrivalCurveDNC.java
instead of ArrivalCurveDNC_Affine.java
. Nevertheless, I think a suffix is the better way.
As we are currently adding code that is specialized to certain curve shapes (Affine and PwAffine), we seem to have silently decided that is is not enough to place the according interface implementations (classes) in a separate and reasonably named package. We also vary the class name by a prefix and/or suffixes to include all the specializations. Imho, this is not a problem. Yet, we do so in an inconsistent way. I would like to agree on a common naming convention to be implemented before the first release of specialized code.
Here are my observations (probably also introduced by me):
I recommend to: