5 ms·
Consider arbitrary precision, rationals, interval arithmethic, countless algebraic types, matrices, vectors with all of them requiring typing and composing long
by FrozenVoid 6y ago
Consider arbitrary precision, rationals, interval arithmethic,
countless algebraic types, matrices, vectors with all
of them requiring typing and composing long functions
versus intuitive formula:
mpz_mul(res,x,y);
mpz_mul(res,res,z);
vs
x*y*z;
```
- jstimpfle 6y agoThe following style is much better: v3 r = Add_v3(v, w); v4 w = Scale_v3(r, 1.0); You can definitely write a little 3D graphics backend this way. C's lack of operator overloading can be annoying for some tasks, however I still like to use C for almost everything to this day, because of the lightness of going through old code and seeing instantly what happens - never have to run any type resolution in my head. And importantly, _knowing_ that I don't have to do this. Because I might almost never have to do this in cleanly written C++ code, but how do I know?