Damus
Fabian Giesen profile picture
Fabian Giesen
@Fabian Giesen
FORTRAN 77: we pack our data structures into flat arrays and use indices instead of pointers because we don't have pointers or any data structures other than flat arrays

Later langs: Look at this bullshit! Pointers go go go!

Even later: we pack our data structures into flat arrays and use indices instead of pointers because they can be smaller and are easily bounds-checked. Also the borrow checker is no fun when slinging too many pointers around
1
Wolf480pl · 13w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqpu3ryltaaqjym9gj5fpcv623edtfh2vuvrtcd8pz75p6nlyt0nrqwf22w0 I've heard that this approach - struct-of-arrays instead of array-of-structs - also works well on JVM, for example Minecraft was initially written like this. Allegedly, if you write yo...