[erlang-questions] OOP in Erlang

Ed Keith e_d_k@REDACTED
Wed Aug 11 13:04:39 CEST 2010


--- On Wed, 8/11/10, Hynek Vychodil <hynek@REDACTED> wrote:

> From: Hynek Vychodil <hynek@REDACTED>
> Subject: Re: [erlang-questions] OOP in Erlang
> To: "Guy Wiener" <wiener.guy@REDACTED>
> Cc: "Erlang Questions" <erlang-questions@REDACTED>
> Date: Wednesday, August 11, 2010, 4:37 AM
> On Wed, Aug 11, 2010 at 9:44 AM, Guy
> Wiener <wiener.guy@REDACTED>
> wrote:
> > I have to stand up for OOP at this point: OOP does not
> start and end with
> > "encapsulating code and data". The OOP feature that
> has the strongest impact
> > on code brevity is *inheritance*. Thus, the interest
> in extending modules.
> 
> I can't agree with you. Inheritance is only way how some
> OOP language
> copes with complexity of OO systems. Inheritance is neither
> core nor
> mandatory feature of OOP. What worse, many of OO affected
> people what
> I met stated that inheritance is most controversial and
> mostly misused
> feature of OOP. I also observe that there is positive
> correlation with
> person experience and probability that will tell or agree
> with above
> statement.
> 
> >
> > Also, IMHO, parameterized modules are a more compact
> way to encapsulate code
> > and data, since that you don't have to pass the data
> structure around as an
> > explicit state (assuming, of course, that the data is
> immutable).
> >
> > Guy
> >
> >
> > On Wed, Aug 11, 2010 at 5:17 AM, Ngoc Dao <ngocdaothanh@REDACTED>
> wrote:
> >
> >> The mostly used feature of OOP is probably
> encapsulating code and
> >> data. Have a look at gen_server:
> >> http://www.erlang.org/doc/man/gen_server.html
> >>
> >>


When I first studied OOP, in 1990, I was taught that OO was defined by four features: Encapsulation, Abstraction, Inheritance, and Polymorphism. That if any of these were missing it was not OO.

      -EdK

Ed Keith
e_d_k@REDACTED

Blog: edkeith.blogspot.com





      


More information about the erlang-questions mailing list