A clear separation between Point and Vector makes perfectly sense. Ideally, Point should be deprecated then. Otherwise it is a complexity growth.

Hilaire


Le 26/10/2017 à 11:39, Tudor Girba a écrit :
To make the conversation more interesting, in Bloc we also have BlPoint with 
subclasses for 2D, 3D and 4D. The reason for this is that we model explicitly 
the intention of usage even if they share the instance variable names. We did 
not use Point because we needed 3D and 4D as well and Point has too many 
meanings that are conflated into one.

This pattern was used everywhere we could. For example, we have BlBounds 
instead of Rectangle (actually, this is also because of performance reasons of 
working directly with 4 numbers rather than 2 points).

Of course, these come with an apparent extra maintenance cost. So, if we see a 
possibility of unifying we should definitely take it, and this is where 
external reviewers can help to point out possibilities. We should just not 
unify just for the sake of it.

--
Dr. Geo
http://drgeo.eu



Reply via email to