HackerTube

CppCon 2018: Stoyan Nikolov “OOP Is Dead, Long Live Data-oriented Design”

CppCon3 HN recommenders · recommended in 3 months, 2018–2021
YouTube
talk · intermediate · evergreen · 2018–2021 on HN

A CppCon 2018 talk arguing that OOP has failed to deliver on reuse and performance, and presenting data-oriented design for C++ with practical worked examples from real systems.

HN cites it as a concrete, worked example of data-oriented design and as an alternative to OOP in performance-sensitive code.

10 comments from Hacker News

@nikki932020-08 · in “Unity Software Inc S-1”

Glad to see some agreement there. I'm interested in building an ECS-based approach for a UI system at some point. The Yoga layout engine (implements flexbox -- link ) seems to actually be pretty amenable to just incorporating as a `Layout` or `Flex` component, then you could have components for platform-specific renderings (eg. `iOSTextInput`, `AndroidTextInput`, `DOMTextInput` in wasm, ...) that could read from cross-platform common components (`TextInput`). A core aspect would also be a `Hierarchy` component that just has a parent entity id and a list of child entity ids (that it keeps in sync properly). Then bind things to JS and allow you to code it from React, while still being able to eg. run an animation thread for some specific animations that just queries and reads/writes the `Layout` and `AnimationSpec`s etc. Interesting talk re: data oriented design for a webby animation engine here actually: ▶ this video

Recommends View on HN
@michael_j_ward2019-12 · in “Practical Examples in Data Oriented Design”

Just adding a more recent video on it from CppCon 2018 where the presenter goes over a specific worked example. ▶ this video

Recommends View on HN
@phaedrus2018-10 · in “C++17 constexpr Compile-time Ray Tracer (2017)”

That's a very good point. It might be question of high versus low level. From a video I watched today (the rest of the video is worth watching, too, but the following stand-alone quote is apropos): "Polymorphism and interfaces have to be kept under control. I don't believe that their role is in a very low level system like interpolating a couple of numbers in the animations, but they have their place in high level systems, in client facing APIs. They are amazing if you do a type of plug in and you really need some type of dynamic polymorphism." ▶ this video

Recommends View on HN
@jfpardy2021-06 · in “Data-oriented design or why you might shoot yourself in the foot with OOP (2009)”

There's been a few talks: CppCon 2014: Mike Acton "Data-Oriented Design and C++": link CppCon 2018: Stoyan Nikolov “OOP Is Dead, Long Live Data-oriented Design”: ▶ this video Building a Data-Oriented Future - Mike Acton [2019]: link And a blog/book has been created: link

@nikki932020-08 · in “Kosmonaut: web browser from scratch in Rust”

Some UI rendering engines for games do something like this, eg. link -- talk by one of the devs of that at ▶ this video