[Haskell-cafe] value vs object orientation

Richard A. O'Keefe ok at cs.otago.ac.nz
Wed Oct 15 02:55:38 UTC 2014


On 15/10/2014, at 4:20 AM, Rustom Mody wrote:

> Thanks Richard for your thoughts, especially
> 
> I suppose you could summarise it as
>  - the value perspective asks
>    "what does this value MEAN?"
>  - the object perspective asks
>    "what does this object DO?"
> 
> [I usually formulate it as the understanding focus vs the doing focus; probably not much difference]

It's interesting that the "semiotics" paper that someone
already mentioned also identifies "being -vs doing" as the
key question, but to my mind has it backwards.  That paper
identifies "being" with *internal structure* and "doing"
with *interface* (in the Java sense) and to my way of
thinking seriously misapplies the term "abstract data type"
and makes some criticisms on the basis of a straw man bad
design.

Let me clarify here that the value perspective is NOT
about knowing (still less about _having_ to know) the
structure of things.  You think about the value (the
state of) a thing *represents*, not its implementation.

One of my biggest gripes with Java is that students
learning it never seem to get the hang of encapsulation;
they'll make _everything_ public by default, which means
that such an "object" is at the mercy of the whole world
and cannot be said to represent anything other than its
parts.  Maybe that's what formed the perspective of that paper.



More information about the Haskell-Cafe mailing list