Like I said, my goal is to write safe code and not rely on internal hacks. Optimizations are not my concern, for the moment, as I delegate them to improvements to the Nim compiler.
Solution #1 relies on knowledge of `seq[]` internals, and even if it's widely used, I'm reluctant to using it in my code. What are the chances that `seq[]` is optimized in Nim v4 to balance its internal data structure between the _legacy_ `array` and an optimized structure when many element moves occur, all decided by the compiler?
