After having watched Jonathan Blow's talk on Jai

https://www.youtube.com/watch?v=TH9VCN6UkyQ&t=2880s

I realized that we should add his Array-of-Structures (AoS) concept to Phobos, preferrably in std.typecons.StructArrays, as something like

template StructArrays(Members...)
{
    struct StructArrays
    {
        // template mixin magic that creates

// a pointers elements plus accessors for each Member in Members

        // element type for members functions that
        // mimic array of structures
        struct Struct
        {
            Members members;
        }

        // and used here
        Struct byStruct() // perhaps also opSlice
        {
             // returns call to map
        }

        size_t length;
    }
}

Have anybody done this already?

Reply via email to