4 ms·
> I've constructed similar utility types in C and find them quite convenient. It's very convenient to have the distinction between the backing memory (array) an
by masklinn 5y ago
> I've constructed similar utility types in C and find them quite convenient. It's very convenient to have the distinction between the backing memory (array) and a slice viewing a portion of it instead of just a dynamic array.
Of course that's convenient, the issue of Go's slices is that they act as both a dynamic array and a slice viewing a portion of one. The two uses conflict with one another, and the interactions are full of traps.