Live data from Hacker News

All evidence points to OOP being bullshit (2013)

blog.pivotal.io

61–70 of 126 posts

Re: All evidence points to OOP being bullshit (2013)

#61

Does anybody know of any language that supports OO, but that lets you declare pure functions/methods - enforcing that those pure functions/methods only use other pure functions, don't use global objects, etc? Lately we're adopting Redux [1] together with React and the idea of being able to mix functional and OO in a better way looks more and more interesting to me. [1] https://github.com/rackt/redux

Does anybody know of any language that supports OO, but that lets you declare pure functions/methods - enforcing that those pure functions/methods only use other pure functions, don't use global objects, etc?

Well, turns out that one of the oldest programming languages in existence, Fortran lets you do OOP, it also has pure functions and subroutines. I'm talking about about Fortran 95/2003/2008:

http://h21007.www2.hp.com/portal/download/files/unprot/fortr...

Re: All evidence points to OOP being bullshit (2013)

#62
post #47
post #32

I appreciate there's something I'm missing, but: I use closures to hold state all the time in node, I still don't understand why state in a closure is better than state in an object. If someone could explain this I'd be grateful: articles like this just seem to say 'state is bad' and ignore that it still exists in functional scopes.

State in a closure is equally as bad as state in an object. The difference is FP gives you ways to manage and isolate state that simply don't exist in OOP.

[deleted]

Re: All evidence points to OOP being bullshit (2013)

#63

Does anybody know of any language that supports OO, but that lets you declare pure functions/methods - enforcing that those pure functions/methods only use other pure functions, don't use global objects, etc? Lately we're adopting Redux [1] together with React and the idea of being able to mix functional and OO in a better way looks more and more interesting to me. [1] https://github.com/rackt/redux

I'm actually working on such a language [1]. It's OOP, but it makes a division between 'doing objects' (services) and 'being objects' (values). It's coming along, but it's still missing many vital things. It wasn't inspired by, but bares a striking resemblance to, the noop language [2].

[1] https://github.com/DanielWaterworth/plastic

[2] https://en.m.wikipedia.org/wiki/Noop

Re: All evidence points to OOP being bullshit (2013)

#64

"All evidence" seems to me a real gross overstatement here. The author collected some topics, where he means that OOP is bad and sticks some (partly related) statements of other people to it and wants to convince with that, even when he makes some valid points here [1]. I do not buy that. The reality is, that when OOP is correctly executed (and there is the real culprit, since few people have really understand it!) i…

> it really can help you to lower the complexity of programs

Yet to be proven. I never seen a single example of OOP bringing anything but more unnecessary complexity.

Re: All evidence points to OOP being bullshit (2013)

#65
OOP, as defined as a set of principles, is a complete load of horse shit. There are many more reasons other than what the article states as to why it doesn't deal with realities of software (e.g. data oriented programming solves some of them). OOP principles are likely one of the reasons it takes so long to train fresh-out-of-college employees, as they first need to learn how to forget that utter bullshit.

However, that does not mean that OOP languages are a bust. It is only the OOP principles that are a problem.

So far my experience goes, I've learned to mostly stop creating analogues of real-world things (as OOP principles would have it), except where it makes sense to, and instead use OOP features to create distinct responsibilities. Turns out OOP languages are identical to, let's say, "responsibility oriented programming" languages.

OOP languages can also be used for other things, as previously mentioned: data oriented programming. DOP is used widely in gamedev. Gamedev also happens to be an industry that heavily uses an OOP language: C++.

Hate the principles, not the languages. There's a big difference.

Re: All evidence points to OOP being bullshit (2013)

#66

Does anybody know of any language that supports OO, but that lets you declare pure functions/methods - enforcing that those pure functions/methods only use other pure functions, don't use global objects, etc? Lately we're adopting Redux [1] together with React and the idea of being able to mix functional and OO in a better way looks more and more interesting to me. [1] https://github.com/rackt/redux

Does anybody know of any language that supports OO, but that lets you declare pure functions/methods - enforcing that those pure functions/methods only use other pure functions, don't use global objects, etc? Well, turns out that one of the oldest programming languages in existence, Fortran lets you do OOP, it also has pure functions and subroutines. I'm talking about about Fortran 95/2003/2008: http://h21007.www2.hp…

I would never have guessed. I wonder why this didn't spread more - it looks like a great way to mix FP and OOP.

Re: All evidence points to OOP being bullshit (2013)

#67

Does anybody know of any language that supports OO, but that lets you declare pure functions/methods - enforcing that those pure functions/methods only use other pure functions, don't use global objects, etc? Lately we're adopting Redux [1] together with React and the idea of being able to mix functional and OO in a better way looks more and more interesting to me. [1] https://github.com/rackt/redux

I'm actually working on such a language [1]. It's OOP, but it makes a division between 'doing objects' (services) and 'being objects' (values). It's coming along, but it's still missing many vital things. It wasn't inspired by, but bares a striking resemblance to, the noop language [2]. [1] https://github.com/DanielWaterworth/plastic [2] https://en.m.wikipedia.org/wiki/Noop

Good luck with your enterprise! My ideal would be to have this introduced to existing OOP languages (eg Ruby).

Re: All evidence points to OOP being bullshit (2013)

#68

Earlier quoted context omitted.

Jesus christ you really destroyed any chance anyone had of taking your point seriously by just throwing in some racism.

I'm a misogynist as well. How does that affect my argument? That's the point of throwing in a controversial example: no matter how you feel about an issue, reality is still out there, with hard edges and sharp points. If you ignore it and go the "everything is just as good"-way, you suffer. You may feel good about yourself, but you still do worse.

> How does that affect my argument?

It's irrelevant to the discussion, so: no. Both add nothing to the topic of the discussion and are thus completely worthless opinions within this context. You can be whatever you like, but your prejudices have nothing to do with OOP - leave them out of this discussion please.

Re: All evidence points to OOP being bullshit (2013)

#69
post #48
post #39

Earlier quoted context omitted.

My sentiments exactly, kinda surprised this title made it so high up! OOP has some fantastic applications and may have been oversold to the author for a project he worked on. OOP(s)!

> OOP has some fantastic applications Yes, OOP is great for agent-based simulations. Only. This is a fantastic, exciting area, but it is extremely niche and tiny. Anywhere else, OOP is nothing but an obstacle.

It's kind handy for using other peoples code. Like if you want a couple of Google maps on your page you can create a couple of map objects and set their location, colouring, add and remove markers etc. I'm not sure how you'd do that neatly without objects. Beyond that I'm happy without it.

Re: All evidence points to OOP being bullshit (2013)

#70
post #5

> Extremist languages like Java force you to think of everything in terms of objects. Erm, Java is by far not the most OO programming language there is. For example, primitive types are not objects (no, auto-boxing doesn't make them objects). > But is Object Orientation (OO) a good idea? Probably as good as any other programming paradigma out there. > Does it have problems? Sure, like every other language as well. >…

App guy, clearly. Doesn't need to do anything more than once. Has libraries to do the rest (who wrote those? how were they designed?)
Post reply on HN