3 ms·
Scala supports Unicode characters in identifiers. It would be interesting to know your take on that.
by jankotek 7y ago
Scala supports Unicode characters in identifiers. It would be interesting to know your take on that.
- filleokus 7y agoDoesn't almost all major "modern" languages support that? The list is quite long: https://rosettacode.org/wiki/Unicode_variable_names https://rosettacode.org/wiki/Unicode_variable_names
- jankotek 7y agoScala supports not just variables, but operators. * or + are not part of language, but methods in library.
- pritambaral 7y agoIn symbolic programming languages (like Lisp), very few characters are "part of language", as you say. In fact, some lisps (at least the ones I use: Common Lisp, and Racket) even support reprogramming the reader.
- gatestone 7y agoSo does Go. And in Plan 9 all compilers did. I bet this is the first exmaple of a humorous Hello world in C with Unicode smileys in identifiers: https://youtu.be/dP1xVpMPn8M?t=695 https://youtu.be/dP1xVpMPn8M?t=695, by Dennis Richie I think.
- rurban 7y agoMostly insecure. Everybody is violating the Unicode security considerations. Only known to be secure are java and cperl. rust followed my advise then for better unicode identifier security, but I haven't checked if they really promise some General Security Profile. http://perl11.org/blog/unicode-identifiers.html http://perl11.org/blog/unicode-identifiers.html http://www.unicode.org/reports/tr39/ http://www.unicode.org/reports/tr39/ http://www.unicode.org/reports/tr36/#Security_Levels_and_Alerts http://www.unicode.org/reports/tr36/#Security_Levels_and_Ale... http://www.unicode.org/reports/tr31/#Table_Candidate_Characters_for_Exclusion_from_Identifiers http://www.unicode.org/reports/tr31/#Table_Candidate_Charact...
- bayesian_horse 7y agoJavascript and Python do, to. But the keywords are in English and there are several different linguistic biases like word order, counting etc. That's way internationalization is a lot harder than just applying a dictionary.