N
neuneudr
All of the above is predicated on "[h]aving dismissed constructors", a
fragile premise.
True.
Avoid constructors is one of those rules that has a good point in some
cases, but end up with a ridiculous result when applied consistently
to everything.
The article specifically says that the problem is publicly exposing
constructor to users of your API.
And that is because doing so breaks encapsulation to no avail.
And breaking encapsulation is not very OOish, no matter the
definition of OO.
Gilad Bracha is one Java's author and a JLS co-author. The man wrote
his own programming language and knows more probably more about Java,
SmallTalk and Scala than anyone in this group.
So I'm not exactly sure that I buy a one-liner saying that Gilad
Bracha
is basing his OO reasoning on fragile premises...
But that may be just me...