Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Data Oriented Programming. In short, don't entangle your code with data, and the data should immutable.

https://blog.klipse.tech/databook/2020/09/25/data-book-chap0...



Data Oriented Programming originated from video game development and is all about knowing your hardware and making sure you transform data A into data B in the most efficient way possible.

This tends to have other benefits besides performance as the simplification of code that results from focusing on the right thing also tends to help with architecture (until you go ham on optimization).

What it most certainly is not about is immutable data since that's counter to efficiency. It's hard to beat a big fat buffer you poke at directly. Not entangling code with data and focusing on immutable data is Functional Programming, pretty much its definition, not Data Oriented Programming.


A program with only immutable data cannot do anything interesting, almost by definition. Some data has to be mutable.


Only has to be at the root.


Please allow me to decide how I structure my code. I do not need help.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: