4 ms·
I agree. The other day I had to dive into the libigl [1] matrix structure (for those that don't know, a matrix is basically a 4x4 grid of numbers). What I found
by hacker_9 10y ago
I agree. The other day I had to dive into the libigl [1] matrix structure (for those that don't know, a matrix is basically a 4x4 grid of numbers). What I found was over 10 levels of inheritance, along with rampant template use and macros _everywhere_. It actually took so long to parse I ended up just changing my algorithm completely to avoid having to use it. I have utmost respect for anyone that can work with C++ day to day, but I'll be staying away thanks.
[1] https://github.com/libigl/libigl/ https://github.com/libigl/libigl/
- rkangel 10y agoThe problem is that you can find bad code in any language. It's difficult to tell how much that is the fault of the language, and how much is the fault of that particular author. I'm not defending C++ here, I actually agree with you, but it's difficult to provide decent evidence for its failings.
- cbsmith 10y agoOdd. I wonder why they didn't just use Boost uBLAS or similar.
- dimatura 10y agoDoesn't libigl use Eigen for matrices? Eigen is a full-featured matrix library with a pretty decent API. If you just need a 4x4 grid of numbers, then you don't really need a library, sure. But once you need to do matrix arithmetic, basic linear algebra, various forms of indexing, mixing matrices of different types (e.g. float/double/int/etc), things get complicated, fast. A complex library like igl needs all this and more. I'm guessing this is why there's so many matrix libraries - everyone prefers rolling their own, after all, how hard can it be? (I'm guilty of this, so I'd know. But I reach for Eigen most of the time these days).