News for hackers. Stuff that matters.
Re:Programming languages have to break free from the tyranny... by rwmj on Saturday October 30, 2010 @12:11PM (#1851126)
Perl 5 has been able to use UTF-8 identifiers for over a decade, but I don't know anyone who is actually using them.

  $ perl -e 'use utf8; $水=1; print $水,"\n"'
  1
Re:Programming languages have to break free from the tyranny... by d0mine on Saturday October 30, 2010 @12:50PM (#1851228)
The rationale to add non-ascii identifiers to Python:

Python code is written by many people in the world who are not familiar with the English language, or even well-acquainted with the Latin writing system. Such developers often desire to define classes and functions with names in their native languages, rather than having to come up with an (often incorrect) English translation of the concept they want to name. By using identifiers in their native language, code clarity and maintainability of the code among speakers of that language improves. </quote> http://www.python.org/dev/peps/pep-3131/

  $ python3 -c '水=1; print(水)'
  1
But I also don't know anyone who is actually using them.
Re:Programming languages have to break free from the tyranny... by nitrogen on Sunday October 31, 2010 @06:49PM (#1854616)
Right now computer programs written in common languages are internationally readable. It's bad enough having a language barrier in normal human communication. Why do we want to extend the language barrier to code, too? I don't care if it's not English, but there needs to be an internationally-accepted base character set and language for selecting programming language keywords, and that character set needs to be roughly the size of ASCII.
Re:Programming languages have to break free from the tyranny... by vorg on Sunday October 31, 2010 @01:05AM (#1852532)
In this example, i.e. 'print(水)', the Unicode symbol is being used within a syntax designed specifically for an Ascii vocabulary.

If the syntax is changed to allow '打水' instead of 'print(水)', where the language parser knows the single CJK token 打 has a standalone semantic, then needless spaces can be removed.

Re:Programming languages have to break free from the tyranny... by zerohp on Saturday October 30, 2010 @12:43PM (#1851217)
The Go language mentioned in the article uses UTF-8 source code and allows any Unicode letter or digit to be used in identifiers.

Just as you mentioned of perl, very few people use it.

Re:Programming languages have to break free from the tyranny... by koenigdavidmj on Saturday October 30, 2010 @03:03PM (#1851535)
In particular, the case-of-first-character-in-identifier rule breaks foreign character sets, so they have to prefix public members with an X or something.
Re:Programming languages have to break free from the tyranny... by mahmud on Saturday October 30, 2010 @12:31PM (#1851179)
The first mainstream language with native support for Unicode was Java.
Re:Programming languages have to break free from the tyranny... by chromatic on Saturday October 30, 2010 @12:41PM (#1851214)
I've used them. The lambda CPAN module is more useful than it seems.
Re:Programming languages have to break free from the tyranny... by rwmj on Saturday October 30, 2010 @05:21PM (#1851838)
Do you mean this one?

http://search.cpan.org/~ewilhelm/lambda-v0.0.1/lib/lambda.pm

It's sort of telling that the manual page has a lengthy explanation about what to do if you can't see the symbol, and a vim macro that you need to install so you can type the symbol. And it's just one symbol saving 2 characters (and no keypresses) :-(

Re:Programming languages have to break free from the tyranny... by kiujhgbnj on Saturday October 30, 2010 @01:18PM (#1851295)
finally a way to make Perl easier to read