Hacker News new | ask | show | jobs
by jampekka 920 days 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.
1 comments

Interestingly 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.
Side 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.

Fair points. I do find the scope of C macros to be far narrower than overloading, but you are right.