2 ms·
There are options. The D way is to have a `.length` suffix, which makes it act like a struct field. (And `.ptr` if you want to access the pointer part directly.
by WalterBright 3y ago
There are options. The D way is to have a `.length` suffix, which makes it act like a struct field. (And `.ptr` if you want to access the pointer part directly.) Another way is to have a special construct, like C's _Generic, to provide the access.