Can someone explain like i'm five why we use Vectors in Rust the way we use Slices in Go?
For example, my website is written in Go and when the program starts, it reads the content of the "blog/" folder and stores the paths of all the text files, parses everything converting every file into a Post struct and append to a Post slice.
I started learning Rust recently and while reading the book i noticed that slices does not work the same way as in Go, instead it uses Vectors.
I can't understand exactly why is that? English is not my native english so maybe something is flying over my head here.
From what i understood, in Rust you can only create arrays (which have a fixed size) and a slice is just a reference to the data stored in an array?
I understand Go works (almost?) the same way, but you can create slices willy nilly and Go will adjust the underlying array to fit everything when it grows.