|
|
|
|
|
by netbioserror
1055 days ago
|
|
Basically, but it requires no extra syntax. `var some_seq = @[1, 2, 3, 4]` is a stack-managed sequence. That's all there is to it. There's no unwrapping any pointers or boxes or what-not, the type is just `seq[int]`. Put another way, things that have become best practice in C++ are default in Nim with no syntactic noise. |
|
That doesn't happen by default in C++ either.
std::vector<int> some_seq{1, 2, 3, 4, 5, 7};