Live data from Hacker News

All evidence points to OOP being bullshit (2013)

blog.pivotal.io

101–110 of 126 posts

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

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

> It's kind handy for using other peoples code.

The heavily OOP libraries with deep hierarchies are the least pleasant to use. With all those horrible enterprisey FactoryFactoryFactoryFactories, etc.

Flat, fluent, ideally DSLish APIs are much easier to use.

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

#102
post #97

Earlier quoted context omitted.

Than you might not have seen good OOP designs. My experience is different -- when you really apply good OOP design to software, you can reduce complexity and come to a clearer overall design. But of course the typical 5 day Java or C++ course will not get you there. You must learn to think in OOP -- and that is a process that might take years.

What books will get you there?

[deleted]

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

#103

Earlier quoted context omitted.

Than you might not have seen good OOP designs. My experience is different -- when you really apply good OOP design to software, you can reduce complexity and come to a clearer overall design. But of course the typical 5 day Java or C++ course will not get you there. You must learn to think in OOP -- and that is a process that might take years.

Could you please point to a classic example of a good OOP design, where it is clear that OOP made it simpler.

[deleted]

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

#104
post #102
post #97

Earlier quoted context omitted.

What books will get you there?

[deleted]

And how exactly patterns make life easier? Most of the classic OOP patterns are nothing but workarounds for the complexities introduced by using the OOP in the first place. Without OOP these problems would not exist at all.

Why people are so keen on solving problems they just created for no good reason at all?

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

#105
post #103

Earlier quoted context omitted.

Could you please point to a classic example of a good OOP design, where it is clear that OOP made it simpler.

[deleted]

You sound like a religious adept. Open your eyes, just see the truth, blah-blah-blah.

I asked for a very simple thing - a piece of code which is easy, robust and maintainable because of its use of OOP. All of the qualities are objective and easy to measure, regardless of your philosophy. There must be at leat some examples of this. If they do not exist, then your claims that OOP eliminates complexity are nothing but religion, not backed by any evidence at all.

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

#106
post #102

Earlier quoted context omitted.

[deleted]

And how exactly patterns make life easier? Most of the classic OOP patterns are nothing but workarounds for the complexities introduced by using the OOP in the first place. Without OOP these problems would not exist at all. Why people are so keen on solving problems they just created for no good reason at all?

"For example, in the OO world you hear a good deal about "patterns". I wonder if these patterns are not sometimes evidence of case (c), the human compiler, at work. When I see patterns in my programs, I consider it a sign of trouble. The shape of a program should reflect only the problem it needs to solve. Any other regularity in the code is a sign, to me at least, that I'm using abstractions that aren't powerful enough - often that I'm generating by hand the expansions of some macro that I need to write." from http://www.paulgraham.com/icad.html

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

#107
post #103

Earlier quoted context omitted.

[deleted]

You sound like a religious adept. Open your eyes, just see the truth, blah-blah-blah. I asked for a very simple thing - a piece of code which is easy, robust and maintainable because of its use of OOP. All of the qualities are objective and easy to measure, regardless of your philosophy. There must be at leat some examples of this. If they do not exist, then your claims that OOP eliminates complexity are nothing but…

[deleted]

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

#108
post #3

What probably scares me most is, that managers think OO is in general a wonderful best practice you need to have in the company...

Managers who think, there is a silver bullet, always scare me!

Your use of commas has changed the meaning of your sentence. They look like parenthetical commas [0] to me, so the sentence reads as "Managers who think (there is a silver bullet) always scare me!".

[0] http://www.bristol.ac.uk/arts/exercises/grammar/grammar_tuto...

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

#109

Earlier quoted context omitted.

Managers who think, there is a silver bullet, always scare me!

Your use of commas has changed the meaning of your sentence. They look like parenthetical commas [0] to me, so the sentence reads as "Managers who think (there is a silver bullet) always scare me!". [0] http://www.bristol.ac.uk/arts/exercises/grammar/grammar_tuto...

Thank you. I am sorry, I am no native speaker!

Unfortunately, I can not change the post any more.

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

#110

Earlier quoted context omitted.

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.

Yes the checks were exactly what I was thinking about; that way you can be sure that you don't inadvertently do mistakes there. But probably Ruby (or javascript), with their ability of monkey patching, would make that almost impossible. Maybe some Javascript "transpiler" could do it... it would be really interesting.

It's not just monkey patching that causes problems, though it certainly doesn't help.

The advantage of going with some sort of transpiler is that you can have two kinds of code within the same process whilst you make a gradual transition. I feel like, it could be made to work, but the boundary would have to be quite heavy-weight. Think less gradual typing and more FFI.

Edit: actually, in depends on which side is doing the calling. Going from checked to unchecked code is a minefield, but if it's unchecked code calling into checked code, it could work quite well as long as the arguments are immutable and don't have methods that can do IO.

Post reply on HN