>(i.e. matrices of compatible dimensions)
What language do you use where you can get these kinds of guarantees? As far as I know very few languages provide those kinds of dependent types statically.
What language do you use where you can get these kinds of guarantees? As far as I know very few languages provide those kinds of dependent types statically.
There are a few shining exceptions, but not many.
Typechecking is very useful here: if you try to transform a point in space represented by a Vector3 by a general 4x4 matrix, it fails compilation because you have to convert the point to homogeneous coordinates first. Very useful information from the type system.
That is, generalized matrix types, not simply rotation matrix types or whatnot for special cases.