3 ms·
I would agree, except for the fact that slices have a lot of very convenient sugar syntax, making it look like the de facto standard for storing anything (with
by bsaul 12y ago
I would agree, except for the fact that slices have a lot of very convenient sugar syntax, making it look like the de facto standard for storing anything (with maps that is).
Well, i may be spoiled, but ever since i stopped working with C, i never had to deal with data structure so different between arrays and list than go (that is, slices and container/list).
The performance concern is an absolute hypocrisies. Whenever you decide which structure you pick in eg, Java, you know that the various containers are optimized for various operation, and you decide which to use depending on performance only.
In go the language is so broken (because of the type system) that using a chained list vs an array makes your code look completely different.