4 ms·
Sounds like you have both little experience with rust and didn't read the linked page. Dynamically sized arrays have been in the standard library since day 1.
by PudgePacket 6y ago
Sounds like you have both little experience with rust and didn't read the linked page.
Dynamically sized arrays have been in the standard library since day 1.
https://doc.rust-lang.org/stable/std/vec/struct.Vec.html https://doc.rust-lang.org/stable/std/vec/struct.Vec.html
- bsaul 6y agoi didn't mean rust didn't have dynamic sized arrays, i even mentionned Vec in my comment. I am indeed a beginner in rust, and i was surprised by the completely different syntax & types for arrays and Vec... I read about it afterward and get the reason for it, but that's the first time i encountered that peculiarity in a language..
- nindalf 6y agoI think you were downvoted because your comment appeared to be making an incorrect assertion confidently, rather than asking a question. > funny how rust doesn't seem to let you easily work with dynamically sized array Could instead have been > why did the author choose a hashmap?
- brundolf 6y agoA Rust Vec is very similar, if I recall correctly, to a C++ vector. It can basically be used like a List but is implemented underneath as an automatically dynamically-sizing array.
- PudgePacket 6y agoThat's fair, many languages will only have Vecs, and will call them arrays, so it can cause confusion coming to Rust :)