Currently it seems like the following does not work:
let s: seq[int] = newSeq(10)
because int cannot be inferred on the right side of the assignment. This seems like something which the compiler could be able to do (e.g. I believe C++ does this), so I was wondering if there was some way to enable this behavior or some reason why it can't work?
Thanks!
It's not a limitation.. the inference flows from right side to left side.
So instead of:
let s: seq[int] = newSeq(10)
Do:
let s = newSeq[int](10)
That's even more concise :)