Live data from Hacker News

The Rise and Fall of Object Oriented Programming

medium.com

21–29 of 29 posts

Re: The Rise and Fall of Object Oriented Programming

#21
post #11

One use case where I found OO particularly unsuitable is applications that rely heavily on events. Trying to understand what's happening is hard, when any call to your object structure can trigger changes at any level of your hierarchy, triggering other changes again, and so on. Luckily, the rising popularity of Swift, Kotlin, and Go, will push for a more reasonable use of OO in combination with FP.

Re: One use case where I found OO particularly unsuitable is applications that rely heavily on events. I agree. Events typically have to "belong" to something in OOP, but how they are best grouped or managed may not fit a single-item belonging-ness. I'd like to see languages which are flexible in how events are organized in file systems. Their file grouping wouldn't have to reflect some object hierarchy or odd code s…

I can't agree. Do you know which application who rely heavily on events is anywhere and it is programmed in OOP all around the world?

Windows management systems. Everywhere. OOP works like a charm.

Also, all that stuff you are saying about "expression-based" triggering, it exists and working fine...

Also you are mixing OOP with files and folders and I can't understand why...

Re: The Rise and Fall of Object Oriented Programming

#22
post #11

Earlier quoted context omitted.

Re: One use case where I found OO particularly unsuitable is applications that rely heavily on events. I agree. Events typically have to "belong" to something in OOP, but how they are best grouped or managed may not fit a single-item belonging-ness. I'd like to see languages which are flexible in how events are organized in file systems. Their file grouping wouldn't have to reflect some object hierarchy or odd code s…

I can't agree. Do you know which application who rely heavily on events is anywhere and it is programmed in OOP all around the world? Windows management systems. Everywhere. OOP works like a charm. Also, all that stuff you are saying about "expression-based" triggering, it exists and working fine... Also you are mixing OOP with files and folders and I can't understand why...

Re: Windows management systems. Everywhere. OOP works like a charm.

Good enough, perhaps. Charm, no.

Re: Also, all that stuff you are saying about "expression-based" triggering, it exists and working fine...

Perhaps, but expression-based dispatching is not OOP. It's more comparable to relational or functional.

Re" Also you are mixing OOP with files and folders and I can't understand why...

I don't necessarily proposing mixing. If we can do it without OOP, that would be fine by me. I prefer the source code be organize by how a shop wants to work, not how the framework forces you to. Conway's Law.

Better yet, manage it in a database so one can sort, search, group, and filter by specific need at a given time. Why hard-wire a grouping when we have relational? If I want to see all button-handling events together, query, boom, done! If I want to see events for widgets with labels having the text "cup" in them, query, boom, done! Etc. Bill Gates won't determine my grouping/view, you don't determine my grouping/view, but I do. Me, myself, and I. I like that, it makes me productive.

Re: The Rise and Fall of Object Oriented Programming

#23
post #10

Earlier quoted context omitted.

Re: Well, then it's broken and needs to be refactored. Refactoring means the original design didn't handle change well. Refactoring is badge of disgrace, and should not be considered a standard practice any more than putting out kitchen fires should be considered a standard practice of cooking. One of the key points of abstraction is to make the code change-friendly. If you have to refactor, the code failed that job.…

> Refactoring is badge of disgrace, and should not be considered a standard practice any more than putting out kitchen fires should be considered a standard practice of cooking. I can only grant you the benefit of the doubt and assume you aren't quite using the word the way the rest of the industry does. Replacing two similar code fragments with two calls to a single method is an example of refactoring. In no univers…

"Refactoring" is also often used when for example somebody uses the wrong OOP pattern (doesn't fit changes) and has to convert it to a different OOP pattern.

Re: The Rise and Fall of Object Oriented Programming

#24

This article only says one truth: OOP is not as famous as it used to be. The rest of it it's completely mistaken. The writer has no clue about OOP. Let me tell you the problem with OOP. Everybody said "use objects" you will re-use them over and over, not only for this project but projects in the future as well. But we already have libraries and I still yet to find someone (or enterprise) reusing its own code. Every r…

There have been many claims about OOP that turned out to be mostly hype: reuse, intuitiveness, change-friendly, etc. What's remaining is more subtle and nuanced.

Re: The Rise and Fall of Object Oriented Programming

#26
post #12
post #4

I've always felt so alone in my distaste for ORMs. They often lead to at worst taking way more data than you need and manipulating it all in a language that's not very good at it, or at best running some kind of query-builder which takes a far more complex configuration to get the same data that a simple query could. Objects make much more sense as something to build from a query, not something to be queried themselv…

ORM is one of those "dark grey boxes" we often have to deal with. When they work as intended, they can indeed save time, but when they don't, you have to fiddle in an organic fashion to solve or work around the problem, because otherwise they are thousands of line of code if you wish to dig in code-wise. As an alternative, use stored procedures with Dapper, or use smaller sub-helpers that prepare most of the SQL stat…

"As an alternative, use stored procedures with Dapper"

I understand using Dapper. It is exactly what I want in an ORM. But I've yet to see anyone make a convincing argument for using stored procedures over using parameterized SQL.

Re: The Rise and Fall of Object Oriented Programming

#28

I look at oop as a DSL. A robot that has a method to raise hand is infinitely better mental model than a function from robot to new robot whose hand is raised.

And how do you feel about a function that takes a (mutable) reference to a robot and raises its hand?

Re: The Rise and Fall of Object Oriented Programming

#29

I look at oop as a DSL. A robot that has a method to raise hand is infinitely better mental model than a function from robot to new robot whose hand is raised.

Sergey Dmitriev of JetBrains once said at a conference or interview (I forgot which) that any well designed class library is in effect an embedded DSL.

When you consider that UML tends towards object-oriented modelling of systems, it is practical to consider the methods as the action semantics of the model.

Post reply on HN