5 ms·
> User interfaces need random access to the playlist items, so a vector is the most natural structure to store the items. A vector is provided by the standard l
by josteink 7y ago
> User interfaces need random access to the playlist items, so a vector is the most natural structure to store the items. A vector is provided by the standard library of many languages (vector in C++, Vec in Rust, ArrayList in Java…). But here, we’re in C, so there is nothing.
I so do not miss working with C.
Having higher level abstractions and a working, useful standard library is just too nice.
- bo1024 7y agoThis was the one that got me: > model.get(4); // out-of-range, undefined behavior (probably segfault)