Live data from Hacker News

The Repeated Deaths of OOP (2015)

loup-vaillant.fr

21–30 of 220 posts

Re: The Repeated Deaths of OOP (2015)

#21
post #9

> Enough with the ECS advocacy however. Entity/component/system sounds like model/view/controller. But I like to think of data/logic/presentation. The point being that keeping these dimensions orthogonal is more imoprtant than how they are labeled.

> Entity/component/system sounds like model/view/controller.

Maybe to someone who has no idea what ECS is. ECS is not three things named "entity", "component" and "system".

Instead you have entities separated into components which are transformed by one or more systems that operate on all of them in bulk.

There's literally no overlap between ECS and MVC.

> But I like to think of data/logic/presentation.

It's OK to think however you find it useful for yourself. But data/logic/presentation isn't MVC either.

If I have to use these terms, it'd be rather:

- model: data+logic

- view: presentation output processing

- controller: presentation input processing & mapping to model(s).

Re: The Repeated Deaths of OOP (2015)

#23

The article clearly shows that using the term OOP without further explanation is not helpful at all, rather confusing, because everyone has a different understanding. Compare that the "functional programming" which in comparison has a glas clear definition, which makes it much easier to decide if some program is "pure functional" or not, avoiding prolonged and unproductive discussions.

The funny thing is it's exactly the same thing with functional languages, and no, there's no clear definition of FP. Some FP is lazy, some isn't. Some is immutable, some isn't. Some claim it's a style in any language, others that it's a type of language.

Re: The Repeated Deaths of OOP (2015)

#24
post #15

Earlier quoted context omitted.

They are quite different concepts and certainly in practice. At it's barest, a controller organizes models and renders them into a view. Again simplifying, an entity has components which describe it's functionality, and the entity can get passed through a system. The entity is the concept of the thing, and the components are it's features. The system uses the features to make decisions about how the entity interacts…

> I've never seen MVC used in anything but single-run applications that end with an discrete output. MVCs original use was GUIs, which are not “single run applications with a discrete output”, but instead “software with a perpetual state and loop”. Yes, its since been adapted to web use, which usually fits that single-run description, but still...

That's interesting, I knew it was a pattern older than it's use in the web but hadn't given it much thought. There's certainly nothing inherent in either design that limits them to either use case.

Re: The Repeated Deaths of OOP (2015)

#25
post #16
post #13

Classes were never definitional for OO, so prototypes, as originated in Self and adopted in JS, are not a violation of it. Function calls and messages are, fundamentally, isomorphic. Messages were never definitional. The notion of "purity", everything is an object, was never definitional. That was a Smalltalk conceit. Alan Kay named the idea, but stole it. So he doesn't get to impose his religion. What is definitiona…

The essence of OOP is not inheritance, that’s a nice to have. The essence of OOP is to encapsulate the data and the functions that operate on that data into an object and hide the internal state of the object from the rest of the program.

If this is the essence of OOP, would you consider modules/existential-types in StandardML to be OOP? As a followup, what about OCaml (is that "more OOP"?)

Re: The Repeated Deaths of OOP (2015)

#26
post #20
post #13

Classes were never definitional for OO, so prototypes, as originated in Self and adopted in JS, are not a violation of it. Function calls and messages are, fundamentally, isomorphic. Messages were never definitional. The notion of "purity", everything is an object, was never definitional. That was a Smalltalk conceit. Alan Kay named the idea, but stole it. So he doesn't get to impose his religion. What is definitiona…

> Alan Kay named the idea, but stole it. So he doesn't get to impose his religion. Bit rich to say he "stole it" when he himself said it's just the foundational principle around which systems form (living or not). Which already implies he doesn't claim to have invented it.

Somebody else invented it. Kristen Nygaard, in particular. He identified the three elements.

It is common, when you steal an invention, to insist it is wholly natural, so not really any sort of invention at all. Saying it does not make it true. There was a time before; Kay came after.

Re: The Repeated Deaths of OOP (2015)

#27
post #4
post #3

This is an opinion piece from 2015. It goes without saying that there are no universal standard solutions. As an engineer, you learn how to proceed in a structured and systematic way and (hopefully) apply appropriate methods and technologies that fit the problem at hand. ECS is a good approach and there are many problems where this is a good fit; however, there are also problems where it is a less good fit. The same…

The article doesn't argue that ECS is a good fit for everything. It argues that it is a better fit than OOP for some of the things OOP was intended for. And that it's a broader theme, where OOP is usually not the right tool for the job, even when it was originally intended to solve that particular job.

I'm confused. ECS is a type of OOP, is it not? An entity is an object in the same way a model is an object.

Re: The Repeated Deaths of OOP (2015)

#28
post #13

Classes were never definitional for OO, so prototypes, as originated in Self and adopted in JS, are not a violation of it. Function calls and messages are, fundamentally, isomorphic. Messages were never definitional. The notion of "purity", everything is an object, was never definitional. That was a Smalltalk conceit. Alan Kay named the idea, but stole it. So he doesn't get to impose his religion. What is definitiona…

> Classes were never definitional for OO, so prototypes, as originated in Self and adopted in JS, are not a violation of it.

If we put classes and prototypes in stark opposition, we can say yes, classes are not foundational. But what's the main distinction between classes and prototypes? One is defined statically and other dynamically. Static/dynamic distinction is a matter of optimization, it's not fundamental to the concept.

So I think when someone says "classes" when discussing OOP, they also imply prototypes, templates and all other forms of "molds" for objects that provides for their initial definition when created. In living systems we'd call this DNA. In engineering it's the combination of technical specifications and the equipment we use to materialize them in a factory.

Re: The Repeated Deaths of OOP (2015)

#29
post #26
post #20

Earlier quoted context omitted.

> Alan Kay named the idea, but stole it. So he doesn't get to impose his religion. Bit rich to say he "stole it" when he himself said it's just the foundational principle around which systems form (living or not). Which already implies he doesn't claim to have invented it.

Somebody else invented it. Kristen Nygaard , in particular. He identified the three elements. It is common, when you steal an invention, to insist it is wholly natural , so not really any sort of invention at all. Saying it does not make it true. There was a time before; Kay came after.

[deleted]
Post reply on HN