[isabelle-dev] ADTs in Scala

Makarius makarius at sketis.net
Sat Apr 14 15:09:37 CEST 2012

On Sat, 14 Apr 2012, Lars Hupel wrote:

>> The main thing is the "private" in this odd position, which is Odersky's
>> way to make the constructor private, but the keep the type itself
>> public. This detail seems to have been forgotten in Java -- in fact in a
>> recent talk some Java guru admitted that -- which was also my starting
>> point to google for "private constructor" to find the above solution.
> In fact, the pattern you used is quite common amongst Java developers,
> they just call it "Factory Pattern".

I've heard of this recent addition to the OO vocabulary to fix some early 
conceptual problems of the approach.  That is "object Graph" part only.

How would a Java person solve the private constructor problem?


More information about the isabelle-dev mailing list