Live data from Hacker News

All evidence points to OOP being bullshit (2013)

blog.pivotal.io

81–90 of 126 posts

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

#81
post #44

The best way to see through language paradigm war propaganda is to look at pseudocode. Scientists, mathematicians, logicians write tons of pseudocode and it's almost entirely procedural.

As one of those people who have used pseudocode in papers, I have to disagree. In a scientific paper, you describe what you have in mind using mathematical definitions. This makes it easier to reason about (proofs) and to describe it in an unambiguous way to other people (papers). Pseudocode is used to describe an algorithm following those mathematical definitions. In your paper, you might use sets. A set is defined…

The algorithm might take set(s) as input, sure. If that's inherently OOP then C structs are OOP. In any case, what actually happens to those sets once they're declared, will probably be procedural. "Let I be the intersection of A and B." "Let Restriction be those elements of S which are positive." Etc. You'll rarely ever see factories, managers, private variables, explicit inheritance, or any other flagship OO mechanisms in pseudocode.

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

#82
post #4

With billions and billions of wealth created by SaaS companies that base their platforms and websites on OOP.

>With billions and billions of wealth created by SaaS companies that base their platforms and websites on software. FTFY

Your data points may differ, but eBay makes profits of 1B on mainly a Java platform. Other large companies use Ruby, PHP, Python and Java which all are based on OOP.

But I would be interested in your arguments.

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

#83
post #69
post #48

Earlier quoted context omitted.

> 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.

I don't think anyone is saying don't use objects, it's the OOP paradigm that is being critiqued.

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

#84

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

C++....

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

#85
post #81

Earlier quoted context omitted.

As one of those people who have used pseudocode in papers, I have to disagree. In a scientific paper, you describe what you have in mind using mathematical definitions. This makes it easier to reason about (proofs) and to describe it in an unambiguous way to other people (papers). Pseudocode is used to describe an algorithm following those mathematical definitions. In your paper, you might use sets. A set is defined…

The algorithm might take set(s) as input, sure. If that's inherently OOP then C structs are OOP. In any case, what actually happens to those sets once they're declared, will probably be procedural. "Let I be the intersection of A and B." "Let Restriction be those elements of S which are positive." Etc. You'll rarely ever see factories, managers, private variables, explicit inheritance, or any other flagship OO mechan…

> You'll rarely ever see factories, managers, private variables, explicit inheritance, or any other flagship OO mechanisms in pseudocode.

Because they are implementation details that have no place in pseudocode. Their absence there does not say anything about their usefulness in general. You can't point at some observation about pseudocode and say "See, they don't use it so it must be rubbish." Exceptions, handling of error variables, monads, unsigned ints are also absent from typical pseudocode (unless the context is about those concepts). Does that make them useless concepts aswell?

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

#86

Earlier quoted context omitted.

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).

You can already write programs in this style in Ruby quite successfully, but there are advantages to having it baked into the language. It forces consistency and also opens up opportunities for tooling.

Unfortunately, I don't think it's something that can be bolted on after the fact.

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

#87
post #54

This article is just pointing at the flaws, not really offering any alternative. It is just as GP said, a rant better kept for the water cooler area. You can guess that functional programming is going to be his response I suppose considering this page is the second part of a functional programming article. (the first part being missing) If you want to analyse, you would need to also talk about what OOP is good at and…

Author here, FWIW this article was one of many posts some colleagues and I wrote at Pivotal during a "blog writing tontine" to encourage us all to write more and develop our skills, written hastily and intended to be part of a series I didn't finish before leaving.

My intention was to point readers to some of the good ideas that were emerging (more accurately: had emerged some time ago) from alternative paradigms and how they could be used to make OOP programs better. Agreed that its certainly more about the team than what syntax you use to push bytes around, but tools do matter.

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

#88
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?)

Until working at Pivotal I had been working for about 5 years in various non-app industries: transport, signals monitoring, databases etc. Libraries? Not really, we mostly wrote everything ourselves - at one position, even an entire operating system.

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

#89
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. >…

> For example, primitive types are not objects (no, auto-boxing doesn't make them objects).

Does the presence of inline assembler make C++ a machine language? I don't think so. Similarly I don't think the presence of primitives in Java make it less of an OO language. They're a leaky abstraction meant to improve the language's performance, which arguably make the language less ergonomic to use.

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

#90

"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…

> The reality is, that when OOP is correctly executed

Can you find anyone who agrees on what "correctly executed OOP" is? I don't think there is a consensus on this idea, nor any particularly objective criteria for how to achieve good OOP.

Post reply on HN