On Fri, Mar 21, 2008 at 05:07:07PM -0700, Andrew Lentvorski wrote:

Factories are often the difference between simply adding a parameter to your factory API (perhaps on another function) and having to inherit a whole new class because you can't overload the constructor a particular way.

All of this being just a consequence of the common design choice to only
have a single constructor per class, or only distinguish them by signature.

It's similar to the kinds of restrictions you get by only dispatching on
the first argument.

The thing is, people get used to these languages and don't even realize
that these limitations and workarounds aren't inherent to OO itself.

David

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to