Operator overloading


Can we have operator overloading in every language. I know how to achieve in C++, but is it supported in other languages too ?


Yes, Operator overloading concept is present in other languages too.Some language allows defining new operators. Some languages restrict operator overloading to few operators.The complete list can be seen at the link https://en.wikipedia.org/wiki/Operator_overloading.


Yes it will support in some other languages like python,…
In some languages it didn’t support user defined operator overloading For example, in Java it does not support , it will allow for some operator for built in type of variables.


languages which supports operator overloading are:
c++, ruby, python, perl, c#,php, visual basic .net…etc

languages which does not support operator overloading are:
c, java, javascript, pascal, objective c … etc


no we didn’t have operator overloading in C,java,js…
the languages which supports opertor overloading are c++,python,c#,.net…
so u can achieve operator overloading in c++,python…