Chapter 22. Operator overloading


Operator overloading is a feature of C++, which has ( unfortunately or fortunately [1] ) been removed from Java. What you can do with operator overloading can be performed with common methods “ in fact you define an operator overload using a method itself. Hence, I will not classify operator overloading as an important or essential feature of C#, but rather one which gives good developers more choice and flexibility.

[1] It is unfortunate because operator overloading is a convenient feature which makes programming more elegant. It is fortunate because since it is not an important feature “ you can duplicate operator overloading functionality using normal methods “ not including it in Java makes it an easier language to learn.



From Java to C#. A Developers Guide
From Java to C#: A Developers Guide
ISBN: 0321136225
EAN: 2147483647
Year: 2003
Pages: 221
Authors: Heng Ngee Mok

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net