On Fri, 08 Jan 2021 15:07:54 +0000, The Natural Philosopher wrote:
> It's very simple. It makes things that behave very differently look
> exactly the same.
>
> which is a recipe for disaster
If you use overloading that way, you're an idiot or a coder trying to
lock in a job for life...
To see overloading being used sensibly, look at the TreeMap constructors,
the String constructors or String.indexOf() methods in the Java Standard
Edition API Specification
There are also some good examples of overloading in "A very Informal
Introduction to Algol 68", which, by the way, is not only an excellent
way to learn A68, but is the only serious programming language manual
that has made me laugh out loud in places.
--
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|