DEV Community

Discussion on: Data-Oriented programming: Liberate yourself from objects

Collapse
 
peppesilletti_4 profile image
Giuseppe Silletti

Thanks for sharing :) When do you think a functional approach should be used instead of an OOP approach?

Collapse
 
viebel profile image
Yehonathan Sharvit

AlwaysπŸ€— !

Collapse
 
peppesilletti_4 profile image
Giuseppe Silletti

That's not convincing :) Could you tell me a bit more about why you think that?

Thread Thread
 
viebel profile image
Yehonathan Sharvit

Read the book and you'll be convinced 😁!

Thread Thread
 
brunooliveira profile image
Bruno Oliveira

Hmm, seeing this type of reply makes me a bit sad :)

I think it's fine to advocate for the book, which is actually quite interesting so far, but, most working programmers will read it with the perspective of gaining new insights and/or better leveraging the functional style tools available in their working language, and not to "abandon" objects in any way, simply because it's not possible. Only a TINY fraction of us can use functional programming on our daily job or switch technologies completely.

I think most readers will approach this book with the idea of gaining new insights to apply to their daily work or simply to gain a fresh perspective.

There is no silver bullet, and if there is, it certainly won't be functional programming.... I mean the foundations have been laid out more than 50 or 60 years ago, so if it didn't take off into the mainstream industry in that time frame, it most likely won't now :)

Thread Thread
 
viebel profile image
Yehonathan Sharvit

Actually, in the book I show how to apply the principles of Data-Oriented programming to both FP or OOP languages.