Live data from Hacker News

Joe Is Wrong (2009)

goran.krampe.se

71–80 of 86 posts

Re: Joe Is Wrong (2009)

#71
post #48

When I started programming in Pascal in the early 90s, my procedures/functions and my data were decoupled, spread all over the place. Then I started learning (Turbo)Pascal with OOP. It was godsend. All of a sudden I could structure my code in a way I wasn’t able to do before. Now thirty years later I know how to structure my (Python) code without OO: Via modules. I hardly use OO anymore. And I am drawn to FP more and…

I'm a recent FP convert after 15ish years of OO. I don't hate OO now or anything, but maybe a little? It adds so much more to think about for what I now consider to be no benefit, at least for the types of systems I've worked on in my career. A big thing I've realized is that everything I've worked on has modelled things that are already abstract. For example, I'm working on a scheduling app right now. In real life,…

> It adds so much more to think about for what I now consider to be no benefit

That's my problem with OO too. It encourages people to add unnecessary mutable state to programs and then they have to think about it interacting with everything else and with itself.

When you realize most systems are actually pretty simple once you look at the fundamental data and how it changes and ignore all the architecture built around it - it's a very freeing experience.

> This is not to say there aren't good use-cases for OO (video games come to mind)

Gamedev is currently moving away from traditional OO towards Entity Component System - which is basically a in-memory relational database for your data + imperative code put into classes that are basically modules :)

Re: Joe Is Wrong (2009)

#72

A problem with this kind of debate is that e.g. in their case the author is using quite a good OOP language which is hardly used by anyone. Naturally if I criticize OOP it will be what is a currently used, not what might have been. Also it is uncharitable. If you have experienced problems with OOP, then you know exactly what Armstrong is talking about. And ironically many have said that Erlang is perhaps the most OOP…

> The OOP that dominates today originates with Simula and is part of another OO tradition.

Simula (and early Smalltalk) were an inspiration for Hewitt's Actor model, which directly influenced both Scheme and Erlang. They all have Simula as a fairly influential ancestor.

I'd place the origin of the OO that dominates today with C++ and continuing through Java and C#.

Re: Joe Is Wrong (2009)

#73
post #48

When I started programming in Pascal in the early 90s, my procedures/functions and my data were decoupled, spread all over the place. Then I started learning (Turbo)Pascal with OOP. It was godsend. All of a sudden I could structure my code in a way I wasn’t able to do before. Now thirty years later I know how to structure my (Python) code without OO: Via modules. I hardly use OO anymore. And I am drawn to FP more and…

I'm a recent FP convert after 15ish years of OO. I don't hate OO now or anything, but maybe a little? It adds so much more to think about for what I now consider to be no benefit, at least for the types of systems I've worked on in my career. A big thing I've realized is that everything I've worked on has modelled things that are already abstract. For example, I'm working on a scheduling app right now. In real life,…

I've come full cycle:

0) Procedural

1) OO

2) FP

3) Really started to dislike mutability

4) Developed various FP frameworks

5) Back to pure (immutable!) OO and messages!

Re: Joe Is Wrong (2009)

#74
post #48

When I started programming in Pascal in the early 90s, my procedures/functions and my data were decoupled, spread all over the place. Then I started learning (Turbo)Pascal with OOP. It was godsend. All of a sudden I could structure my code in a way I wasn’t able to do before. Now thirty years later I know how to structure my (Python) code without OO: Via modules. I hardly use OO anymore. And I am drawn to FP more and…

I'm a recent FP convert after 15ish years of OO. I don't hate OO now or anything, but maybe a little? It adds so much more to think about for what I now consider to be no benefit, at least for the types of systems I've worked on in my career. A big thing I've realized is that everything I've worked on has modelled things that are already abstract. For example, I'm working on a scheduling app right now. In real life,…

> For example, I'm working on a scheduling app right now. In real life, a schedule is an abstract concept realized on paper. Our app certainly doesn't have a Paper class.

I am hoping that your application has a function for UnscheduledWorld -> ScheduledWorld.

> I would encourage any OO zealots to give FP a honest try.

Why assume that people who like OO more than FP do so only because they haven't tried FP? Isn't it possible that you are in the honeymoon stage with FP, and as you gain more experience with it (like you have with OO), "the scales will fall off your eyes" as P G Wodehouse would have put it?

Re: Joe Is Wrong (2009)

#75
post #30

The thing I find interesting about revisiting these old pieces is that the debate about the merits of OOP is effectively stymied. This post and the article it replied to posted yesterday ( https://news.ycombinator.com/item?id=26586829 ) could effectively have been written today. And the debate in the comments tends to be pretty formulaic as well. It's one of those perennial topics that generates a lot of heat from re…

I think the core issue is that OO is one of the first “solve everything” paradigms most programmers learn. Lots of good programmers I know (myself included) have spent a year or two of our careers convinced OO is the solution to every programming problem ever, because it feels so powerful. Some programmers never grow out of that phase. And that means there’s an OO shaped standing wave in the pool of programmers. Each…

>...those conversations are fuzzy and nuanced, and hard to have without real code examples.

This rings true to me. I've dabbled in several languages but started out with Java and for the longest time its style of OOP was how I approached building systems.

In the last 2 years though, I've had the opportunity to work with Typescript and it's been really nice choosing what approach you want to take (structs, functions, or objects). I've found that starting off with plain structs and functions has let our systems grow in a way that would have been constrained by Classifying things up front -- you really _do_ learn more about your application as you're writing them, so why paint yourself into a corner by dictating what data and operations have to go hand in hand upfront?

Re: Joe Is Wrong (2009)

#76

To OO or not OO seems like more of a religious preference about functional containment: either at the module level or at the type level. This is why neither seems to satisfy everyone and why there are flame wars about it. On one side there is loose coupling between types and functions, and the other side has strong coupling. On one side, types can be composed simply and the other involves inheritance, overloading, an…

Who considers Go to have a good type system?

Re: Joe Is Wrong (2009)

#77
I don’t want to toot this horn too much (is that a saying?) but I really like the path Rust took.

It is not technically OO but close enough. For me as someone who learned programming with Java (and some SML) and mostly worked with OOPLs after, I never had problems whatsoever. You don’t have inheritance but traits (and importantly trait objects).

The ways to model in Rust with Enums, Structs and Traits are amazing and somehow really fit my mental model.

Re: Joe Is Wrong (2009)

#78
post #12

These discussions tend to boil down to OOP vs FP. That's a false dichotomy. The alternative to OOP is not FP, it's pre-OOP imperative programming with various techniques a la carte. Should data and functions be together? That's a choice you can make on a case-by-case basis. It makes total sense that a HashMap has an insert() method. On the other hand, maybe your Player object is just some data which is interpreted by…

>The alternative to OOP is not FP, it's pre-OOP imperative programming with various techniques a la carte.

The alternative to an object is an abstract data type; both are data abstraction techniques that hides the data under a set of operations. The main difference is that an object includes an interface while an ADT does not. Nothing prevent an object interface to be functional nor an ADT set of operations to be procedural.

Re: Joe Is Wrong (2009)

#79
post #76

To OO or not OO seems like more of a religious preference about functional containment: either at the module level or at the type level. This is why neither seems to satisfy everyone and why there are flame wars about it. On one side there is loose coupling between types and functions, and the other side has strong coupling. On one side, types can be composed simply and the other involves inheritance, overloading, an…

Who considers Go to have a good type system?

What are your qualms with it? Is this a religious question or statement?

Re: Joe Is Wrong (2009)

#80

Imagine being a Smalltalker and still missing the underlying context of Joe's article - specifically, around the actor model (as used extensively in Erlang) being substantially closer to OOP as intended by e.g. Smalltalk than to the popularized inheritance-heavy brand of "OOP". You can see this in the objections: > Objection 1 - Data structure and functions should not be bound together ...and yet the usual way to sto…

Joe himself once said on stage (it was a video with him and Kay on stage, not sure of the name), that Erlang is either the most OOP lang or the least. I think he meant, that it depends on what OOP you look at. If you look at Smalltalk and message passing, as Kay highlights as the prominent ideas, then it might be the most OOP (or somewhere close to), while it is a 180 from mainstream OOP, when we look at the actor sy…

You may like

https://www.quora.com/What-does-Alan-Kay-think-about-Joe-Arm...

Post reply on HN