What’s Wrong with OOP and FP

Paulo Pinto pjmlp at progtools.org
Tue Nov 12 04:19:55 PST 2013


On Tuesday, 12 November 2013 at 11:27:51 UTC, Jonathan M Davis 
wrote:
> On Tuesday, November 12, 2013 12:09:23 
> =?UTF-8?B?Ikx1w61z?=.Marques
> <luis at luismarques.eu>@puremagic.com wrote:
>> I think you will be pleased with the argument, given D's
>> philosophy:
>> 
>>      https://yinwang0.wordpress.com/2013/11/09/oop-fp/
>
> Yeah. Both OO and functional programming are useful, but trying 
> to use any one
> paradigm exclusively always ends up contorting things. To make 
> this clean, you
> really need to be able to mix and match paradigms as 
> appropriate.
>
> On a related note, a classic blog post that I quite like on how 
> Java takes OO
> too far is
>
> http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html

If Java takes OO too far, what to say about Smalltalk and 
derivatives?

>
> The balanced approach that C++ and D take is definitely the 
> better one IMHO
> (and D tends to do it better IMHO, since it better supports 
> functional
> programming than C++ does, meaning that you end up with fewer 
> FP solutions in
> C++ even when they'd be appropriate).
>
> - Jonathan M Davis


The future belongs to multi-paradigm languages, I would say.

What I miss still in languages like D, is the Hindley–Milner type 
inference,
algebraic data types and pattern matching.

--
Paulo


More information about the Digitalmars-d mailing list