What’s Wrong with OOP and FP
Jonathan M Davis
jmdavisProg at gmx.com
Tue Nov 12 03:27:31 PST 2013
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
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
More information about the Digitalmars-d
mailing list