bearophile Wrote: > With the latest DMD versions it's easy to create an immutable array of > structs, with a pure function (I think this gives advantages similar to the > Transients of the Clojure language): > > > ...
Two alternate ideas: 1. Reserve the required space then start appending 2. Use a const-free struct to build the array and then cast array to the proper type on return.
