3 ms·
I just wanted to add to the arrays and seqs comment. >Why do I need two very distinct types performing essentially the same function? Arrays are very simple s
by arc776 9y ago
I just wanted to add to the arrays and seqs comment.
>Why do I need two very distinct types performing essentially the same function?
Arrays are very simple static blocks of memory and can be allocated on the stack, which is really fast, or at compile time. They can't ever be resized.
Sequences have overhead due to being pointers to pointers, however this means that they can be safely resized.
It sounds a bit like you're overwhelmed. Maybe the language needs a really paired down version of nim-by-example to explain these sort of things.
- interfixus 9y agoI actually understand that. But not from any docs I've seen. And then there are open arrays. But only as params in procs. Overwhelmed, nah, just occasionally annoyed. Mind you, I do like my world simple. Hence my envious looks at the Crystal camp.