Hacker News new | ask | show | jobs
by int_19h 2718 days ago
I think that's too extreme. There are many legitimate reasons to slice non-ASCII text - for example, to split it on newlines.
1 comments

That's not trivial and different languages vary in how they handle new line characters even. https://stackoverflow.com/questions/44995851/how-do-i-check-...
You can still split non-ASCII text on ASCII newlines, and quite often that's exactly what needs to be done.
And usually, you don't want it to cost O(n) on top of whatever parser you ran to find those newlines.