On 25.6.14 4:12 , Davide Giannella wrote:
// the name can be changed
interface Node {}
interface NodeBuilder extends Node {}
interface NodeState extends Node {}
I'm not in favour of this for the reasons Jukka brought forward in his
reply. Having the explicit distinction between mutable and immutable is
very valuable as it is a very basic aspect of Oak's fundamental design.
Also while it might seem convenient to pass Node instances around I fear
we will be seeing "if (node instanceof NodeState) {..." pretty soon
afterwards.
When I faced situations where I needed to convert between builder/state
all the time it was sometimes an indication that I could improve the
design.
Michael