Data-oriented design
Data-oriented design is an aspect of the language, and one of these things that you’re going to have to kind of start switching your brain into away from object-oriented design.
Data-oriented design is about is the understanding that every problem you solve is a data problem. Integrity comes from the data, our performance is going to be coming from the data, everything we do, our mental models, everything’s going to be coming from the data. If you don’t understand the data you’re working with you don’t understand the problem you’re trying to solve, because all problems are specific and unique to the data that you are working with, and data transformations are at the heart of everything we do, every function, every method, every encapsulation is really around the data transformations that we’re working on.
Data-oriented design is about understanding the data, writing the code that we need, the algorithms that we need and eventually decoupling those algorithms that we have in the concrete to deal with the data changes.
We’re going to start looking at those data structures, and start understanding why Go only gives us a arrays, slices, and maps, and I want to show you the mechanical sympathies that these data structures have, and how we’re able to not hide the cost of the things that we’re doing, and we’re able to gain more efficiencies when we’re working with the data, and be able to write algorithms that are readable and yet still very, very performant, because, again, on the scale of where do you lose your performance in Go, algorithm efficiency is really at the bottom of that.