You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of our dataClasses have static methods from(x), some have createFrom(x), some have parse(x).
Also, if there are multiple sources a class instance can be created from, the overloading is sometimes done with actual overloading (all named the same) and sometimes the names differ (fromArray, fromMagLiteral).
I’d say we should define a unified convention and re-name functions we come across accordingly.
Personally, I’d vote to use the last mentioned variant, i.e. overloading explicitly in names, and no “create” – The Vec3Int class already uses this convention.
Thanks for your input :) Then I’ll set the new convention as I suggested above. Yes, the create prefix should be removed. Ideally it should say fromSomething(x).
I already started propagating this convention in #6249
Note that this is only about dataclass static methods. More complex creation operations like taskCreationService.createTracingsFromBaseAnnotations(…) should still have the create prefix to indicate what is happening.
Some of our dataClasses have static methods
from(x)
, some havecreateFrom(x)
, some haveparse(x)
.Also, if there are multiple sources a class instance can be created from, the overloading is sometimes done with actual overloading (all named the same) and sometimes the names differ (
fromArray
,fromMagLiteral
).I’d say we should define a unified convention and re-name functions we come across accordingly.
Personally, I’d vote to use the last mentioned variant, i.e. overloading explicitly in names, and no “create” – The Vec3Int class already uses this convention.
@leowe @jstriebel any preferences?
The text was updated successfully, but these errors were encountered: