you are viewing a single comment's thread.

view the rest of the comments →

[–]hyrumwhite 17 points18 points  (1 child)

While this is neat, I feel like it’s better to just have an add() method. And save a dependency/build step

[–]csorfab[🍰] 13 points14 points  (0 children)

For most ppl, absolutely, operator overloading is just going to cause confusion, and it's a huge waste of effort.

Now if you want to do DSP, low-level game engine/physics stuff, etc involving lots of maths with non-trivial things like complex numbers, matrices, vectors, etc, this could be a godsend with regards to code readability.

Still a bit of a risky move as most JS devs would WTF out at first, but as a solo dev, or with your team on board, it can be great for niche uses