3 ms·
Matrices and vectors can be thought of as typed by dimension[0], and it's easy to get that wrong. (I want to say c++'s eigen can do some compile-time checks if
by GFK_of_xmaspast 10y ago
Matrices and vectors can be thought of as typed by dimension[0], and it's easy to get that wrong. (I want to say c++'s eigen can do some compile-time checks if it has the dimensions available).
[0] In some languages, like older versions of pascal, arrays of different lengths were different types, which was a horror for writing generic code.
- dalke 10y agoYes, C++ is a particularly easy language to get that wrong, where float * can be a pointer to scalar, vector or 2d array. Other more strongly typed languages, like Python, will make those errors easy to spot with any sort of test case. Beyond strong typing, do you get the sense that static typing significantly improve prototyping ability for matrix analysis code?