What’s Wrong with OOP and FP

Paulo Pinto pjmlp at progtools.org
Thu Nov 14 02:51:29 PST 2013


On Thursday, 14 November 2013 at 10:01:34 UTC, Jacob Carlborg 
wrote:
> On 2013-11-14 10:37, Don wrote:
>
>> I just can't escape the feeling that class-based runtime 
>> polyphorphism
>> is almost never an ideal solution, and that most of the 
>> benefits and
>> success of OOP languages comes from things other than OOP 
>> itself. And I
>> think it's because OOP is philosophically nonsense -- in the 
>> real world,
>> similarities between things are everywhere, but almost none of 
>> them are
>> is-A relationships.
>
> I think the most useful parts of OOP is encapsulation and have 
> the data and methods in the same place.

Actually no different than using ADT (Abstract Data Types) 
popularized by modular languages like Modula-2, with the added 
benefit of type extension and polymorphism.

Just because OOP has objects in the name, it doesn't need to be 
real objects, but concepts actually.

The main problem was that OOP productivity was oversold hype, in 
the same vein as web 2.0, cloud computing, agile and whatever 
might come next. People need to sell books and certifications.

And that the early OO design approaches focused too much in 
implementation inheritance instead of interfaces and delegation.

--
Paulo





More information about the Digitalmars-d mailing list