3 ms·
> the same would be true if the author did this with a C++ std::vector, or a Java ArrayList, or a Python list, or a JavaScript array. ...or, to be fully honest
by phoe-krk 5y ago
> the same would be true if the author did this with a C++ std::vector, or a Java ArrayList, or a Python list, or a JavaScript array.
...or, to be fully honest, a Common Lisp VECTOR that is then CONCATENATE'd with a new element at its beginning.
As I said in another comment, this isn't the problem of using a given language - it's the problem of using a wrong data structure for the job.
- brundolf 5y agoExactly. And the fact that it's framed as "well I just wanted a straight comparison, I didn't want to wade too far into idioms and Rust-isms in the first pass" feels disingenuous.