In the new nim 19.0, nil and seq of length 0 are the same. So you should not run into this as often.
These are now all valid and work: var a: seq[int] a.add 1 var b = newSeq[int]() b.add 1 var c: seq[int] = @[] c.add 1 Run initializing all seq[] with a dummy variable then wiping them before their intended use \- this seems really strange, but if it works for you it works.