Hacker News new | past | comments | ask | show | jobs | submit login

But why does the strings package exist if it’s better to write out the for loop each time? Do you think there won’t be a slices package after Go gets generics?

The argument that writing out the loop is better for readability is just status quo bias. The real reason we don’t have standard functions for such things is a technical limitation that will probably be removed soon.




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

Search: