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

"It may not work perfectly in 100% of the cases, but that doesn't mean reversing a string is no longer possible."

It depends on your point of view. From a strict point of view, it does exactly mean it is no longer possible. By contrast, we all 100% knew what reversing an ASCII string meant, with no ambiguity.

It also depends on the version of Unicode you are using, and oh by the way, unicode strings do not come annotated with the version they are in. Since it's supposed to be backwards compatible hopefully the latest works, but I'd be unsurprised if someone can name something whose correct reversal depends on the version of Unicode. And, if not now, then in some later not-yet-existing pair of Unicode standards.




> By contrast, we all 100% knew what reversing an ASCII string meant, with no ambiguity.

Not if the ASCII string employed the backspace control character to accomplish what is today done with Unicode combining characters.

Or, in fact, if it employed any other kind of control sequence.


I always thought it was interesting that ASCII is transparently just a bunch of control codes for a typewriter (where "strike an 'a'" is a mechanical instruction no different from "reset the carriage position"), but when we wanted to represent symbolic data we copied it and included all of the nonsensical mechanical instructions.


Well the control codes were specifically for TTY rather than typewriters, many of the control codes still make sense from that standpoint.


Like... \r\n




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: