Live data from Hacker News

Goodbye, Object Oriented Programming

medium.com

161–170 of 355 posts

Re: Goodbye, Object Oriented Programming

#161

The venerable master Qc Na was walking with his student, Anton. Hoping to prompt the master into a discussion, Anton said "Master, I have heard that objects are a very good thing - is this true?" Qc Na looked pityingly at his student and replied, "Foolish pupil - objects are merely a poor man's closures." Chastised, Anton took his leave from his master and returned to his cell, intent on studying closures. He careful…

That's true, but really doesn't have much to do with this discussion

Re: Goodbye, Object Oriented Programming

#163

How about we just say this: OO solves a set of problems albeit with tradeoffs Functional solves a set of problems albeit with tradeoffs There. We can all go back to our tea.

yep... I was just dunking a hobnob while writing some good old imperative C. Did anybody notice that Vulkan, "the future" of graphics APIs, doesn't f*ck around with OO or Functional?

Well, that's because nobody except John Carmack advocates FP for the kind of fast code that complex graphics programming requires. And even he says that it should be used in moderation.

Re: Goodbye, Object Oriented Programming

#164
post #52

Earlier quoted context omitted.

The self-descriptions people use these days are so ludicrous it's hard to tell if it's satire. If I had a Medium account, here's how my description would read: "Software Engineer, Philanthropist, Astronaut, Shark Hunter, Breaker of Chains, Lord Commander of the Snack Bin, Protector of the Repo, and Part-time Cat Dad" Too much or just right?

"former philanthropist" would give it a kind of edgy feel

"I went backrupt philanthropying, that's how much I care!"

Re: Goodbye, Object Oriented Programming

#166
post #135
post #26

Earlier quoted context omitted.

That is a good analysis. While I was reading this article all I could think is "You wanted to do things in a bad way and then you learned how to do it the right way and you don't like the right way?" His entire problem seems to be he thought OO was a magic bullet he could do whatever he wanted with and then he learned there was more to using OO than the three concepts he cites at the beginning. And this guy has suppo…

> And this guy has supposedly been writing in OO languages for decades? What? This is the bit i don't get. It's like he learned OOP in the '90s, when everyone thought inheritance was rad and nobody had realised how terrible mutating shared state was, and then fell asleep for twenty years. None of this article, none of it , has any relevance to how OOP is practiced by informed people today.

The keyword there is informed. There are still plenty of shops that practice OOP this way. I'm working at one right now and there are OOP horrors around every corner.

Unfortunately, they seem intent on adding more mutable state rather then eliminating it.

Re: Goodbye, Object Oriented Programming

#167
post #74

I find many of the objects in .NET very useful and use them in my code. Also in my code I define and use some classes. I like the idea of classes. E.g., in my Web pages, I have a class for the user's state . When a new user connects, I allocate an instance of that class. Then I send that instance to my session state store server. To do that, I serialize the class to a byte array and then send the byte array via TCP/I…

Re: classes, sounds more like you're describing structures. This is not really specific to OO, and it's available in FP languages (e.g. records in Haskell). And these provide scoping, which isn't really encapsulation, as far as I understand it.

Yes, I use OO classes much like I used to use PL/I structures which, of course, are generalizations of C and Cobol structures. And classes have some additional advantages, e.g., can do serialization.

And, what I really like is the name scoping.

For what else is significantly different in encapsulation seems a little obscure. Maybe the biggie difference is not only have the data with name scoping, but also have the code, the methods, stuffed inside the class and making changes in the data in the properties of the class. Okay -- so get to use the class and its methods without keeping track of subroutines/functions separately. Okay.

Re: Goodbye, Object Oriented Programming

#168

Earlier quoted context omitted.

Get two kinds of essentially nested descendancy , static (from the source code) and dynamic from execution as make calls but from which have not yet returned. It's good to think about both at the same time. The push down stack of dynamic descendancy defines what parts of the code are active and, thus, can be called. E.g., the names currently known by inheritance are from the dynamic descendancy working through the st…

Not sure I got it right, does A pass a reference of B to C, since it's an internal subroutine? Isn't that essentially a closure? EDIT: Reading a bit more into it, it's clear that's not it, thought the A/B/C example sounds like it could be done with a closure.

At times I've thought that that little device (pattern?) was essentially a closure, but since I don't really know what a closure is I can't really say!

Uh, I've done a lot of programming in a lot of languages, but my main interest is not as a programmer but as a founder of a startup that needs some software!

Re: Goodbye, Object Oriented Programming

#169

Earlier quoted context omitted.

yep... I was just dunking a hobnob while writing some good old imperative C. Did anybody notice that Vulkan, "the future" of graphics APIs, doesn't f*ck around with OO or Functional?

Well, that's because nobody except John Carmack advocates FP for the kind of fast code that complex graphics programming requires. And even he says that it should be used in moderation.

Also, most languages have an FFI mechanism for calling C libraries (if they have one at all).
Post reply on HN