[erlang-questions] Re: OOP in Erlang

Dave Smith <>
Sat Aug 14 05:25:10 CEST 2010


Yes I agree,  The lack of isolation is where the the big names of OOP went
wrong; the likes of C++, Java, C# and JavaScript provide ways for state to
'leak out' of objects by means of pointers and references.  What good is
encapsulation if member variables are bound to shared objects.  One can
avoid this problem  if he goes our of his way, but in practice, this is
rarely done.  Strict encapsulation should be the rule, not an options.
Arguing that encapsulation is a virtue with respect to these languages seems
very shallow indeed.

 Respectfully, I would not go as far as Joe to say that OO is a poor
paradigm for modelling real world applications, as I've heard him argue in
the past.  I've made a career out of object modelling and writing software
in  C++ and Java -- it's very much the way I approach software design.

The inheritance concept, on the other hand is crucial to OO design; not so
much for the  inherited functionality as for type polymorphism.  Other
languages provide this using algebraic data types and other distinguished
unions, but in OO we work with classes, and we need polymorphic types to
avoid the deluge of conditionals that we would see otherwise.

--DS


2010/8/13 Joe Armstrong <>

> ery much an OOPL - since deep down, very
> deep down, it tries to make makes a passable job of getting message
> passing and isolation right.  In this sense it is far more OO than
> languages like Java (etc.) that have no notion of isolation and thus
> cannot be considered OO
>


More information about the erlang-questions mailing list