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

I'm actually curious if Go would normalize the characters AND if it had used angle bracketd, and make those equivalent to angle brackets? Would he then not have to even change his code?

I guess that's a lot of ifs/ands but it's interesting that one could have future proofed their code if their bet on syntax paid off



They're semantically different characters and Go supports multilingual identifiers, so I would not expect normalization to impact this. At most I would expect normalization to simply deal with ordering combining marks and standardizing on composed or decomposed forms of characters (where applicable.)


This got me curious what I'd read about domain names and visual normalization of Unicode, and found this: http://www.unicode.org/Public/security/revision-05/confusabl...

It might be useful for editors and compilers to check for tricky Unicode (lookalikes for common characters, atypical changes in direction, invisible spaces or other formatting control codes, etc.) in this era of copy/paste coding.


I believe Rust will warn you if your non-ASCII identifiers are potentially confusing based on this list.




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

Search: