3 ms·
A slice is a view over a continguous array. deleting an index in a continguous array is inherently O(n). Go doesn't obscure this. The pain of writing it out ref
by thwd 10y ago
A slice is a view over a continguous array. deleting an index in a continguous array is inherently O(n). Go doesn't obscure this. The pain of writing it out reflects the complexity of the operation.
- deleted 10y ago[deleted]
- coldtea 10y ago>The pain of writing it out reflects the complexity of the operation. And why would one even remotely want that? Unless they seriously think that if the syntax is painful, people will avoid doing it and get better performance...