From the docs, I know that Nim arrays have a fixed length determined at compile time, whereas seqs have a variable length.
I notice that seqs have more builtin tools. For example, in the sequtils
module, map
can take an array but will return a seq anyway, and all
or any
do not work with arrays. And I don't see an easy way to convert a fixed-size seq into an array.
So my question is: what are the benefits of using arrays? Do they provide faster access?