4 ms·
I'd love to use JS instead of Python for math/numerical stuff for many reasons, but without operator overloading it's just hell.
by jampekka 3y ago
I'd love to use JS instead of Python for math/numerical stuff for many reasons, but without operator overloading it's just hell.
- cnity 3y agoInterestingly I dislike Python for the exact same reason. Every time I look at a PR, I second guess every single operator and index. Does this attribute access carry a heavy penalty or side effects? Etc. I find it adds a large mental overhead to any given piece of code.
- jampekka 3y agoSide effects on operator overload or attribute read are just really bad practice and is very rarely done. Do you second guess every identifier in C because it could be a preprocessor macro? Yeah, stupid overloading like C++ IO is a mess, but I haven't encountered much such abuse in Python.
- cnity 3y agoFair points. I do find the scope of C macros to be far narrower than overloading, but you are right.