Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Deleting an element from a slice is a O(n) operation. It better be explicit in the program so the programmer knows just how expensive it is.

The chances of deleting an element in an array being a bottle-neck are really low. I'd rather save my brain cycles for thinking about disk/network access and wait for profiling to show me the problem.



Agreed. And the fact that disk access might end up being a bottleneck is not a good argument for making disk access APIs less ergonomic. I say give the programmer the nicest set of tools possible and let them make informed decisions about what’s appropriate to use when.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: