logoalt Hacker News

theandrewbaileytoday at 11:40 AM3 repliesview on HN

Maybe someone can write an OO language where arrays of structs are automatically stored as structs of arrays.

mild /s


Replies

fp64today at 12:26 PM

Odin has some helpers, was one of the more interesting features I found, but never tried. Not sure if you want to consider Odin OO, but well https://odin-lang.org/docs/overview/#soa-struct-arrays

tlbtoday at 12:36 PM

There's a package to do this in Julia: https://juliaarrays.github.io/StructArrays.jl/stable/

Mizzatoday at 11:50 AM

Are you talking about Zig's MultiArrayList?

show 1 reply