4 ms·
> Heavy use of symbolic operators has thankfully fallen out of style. I assume this refers to operator overloading. I think `a + b - c` looks way more readable
by adrianton3 2y ago
> Heavy use of symbolic operators has thankfully fallen out of style.
I assume this refers to operator overloading.
I think `a + b - c` looks way more readable than `a.add(b).sub(c)` and I'm happy when a language lets me define my own operators for vectors/matrices but I also have a side-curiosity: do they ever have a good use case outside of a math context? I never heard anyone praise `<<` `>>` in C++ for ex.
- threeseed 2y agoIt's mainly about libraries implementing their own symbols e.g. ~>, ~>>, >->, λ Each of which was specific to that library and would confuse new developers beyond belief.
- nsonha 2y agoThe majority of code is not math. I prefer if languages have a math dsl, only in which, the math operators become available. I actually do like symbols as opposed to words (+ instead of append, : instead of as, < instead of extends, -> instead of function etc). They just need to have stable meaning, which conflicts with operator overloading/math.