Operator Overloading Debate

The cluster centers on discussions about operator overloading in programming languages, debating its usefulness for mathematical operations and custom types versus risks of abuse, confusion, and unmaintainable code, with examples from C++, Java, Haskell, Scala, and others.

📉 Falling 0.3x Programming Languages
3,707
Comments
20
Years Active
5
Top Authors
#3823
Topic ID

Activity Over Time

2007
6
2008
13
2009
61
2010
80
2011
94
2012
111
2013
130
2014
283
2015
260
2016
170
2017
199
2018
206
2019
266
2020
272
2021
408
2022
333
2023
321
2024
262
2025
226
2026
6

Keywords

OO RHS PHP e.g JS FAQ overloading.h python.org OMG JavaScript operator overloading operators overload define int foo bar java types python

Sample Comments

nixos • Nov 17, 2016 • View on HN

And in Java, and in any language with operator overloading

Tainnor • Sep 25, 2024 • View on HN

that's just operator overloading and it exists in many statically typed languages too

KAdot • Mar 22, 2016 • View on HN

That's how the operator overloading abuse looks like.

piva00 • Jul 23, 2025 • View on HN

No operator overload, I think it was a wise decision to not allow it after seeing the bizarro world of Ruby, Scala, C++, and others.

sedatk • Oct 3, 2019 • View on HN

They could also overload operators for terseness.

metafunctor • Aug 13, 2021 • View on HN

Operator overloading, what a great idea?

Tichy • Jun 17, 2007 • View on HN

Not all OO languages allow operator overloading.

anamexis • Jan 16, 2018 • View on HN

This is possible in many languages, but not in JavaScript, because it does not support operator overloading.

gergely • Jul 30, 2012 • View on HN

Maybe I'm missing something but what about operator overloading?

coldpie • Jul 11, 2023 • View on HN

Operator overloading is an anti-feature and every language with it, would be better without it. Fight me.