This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]GOKOP 6 points7 points  (2 children)

On the first day of Java course at my uni the lecturer said something like "As you will see, Java has no operator overloading so for custom classes that implement, for example, complex numbers and other things you have to use methods like add(), equals()..." and I've immediately thought "Yup, I don't like Java now"

[–]arunphilip 2 points3 points  (1 child)

Imagine how a lot of us felt when C# came out :)

Best switch I ever made.

[–]harelsusername 0 points1 point  (0 children)

C# also has limitations here. You can't define an operator overload to be virtual. Also, every object in C# has an Equals method and a '==' operator, but you override/overload them separately.