JSR-666: i18n, misspellings and homonyms

10 PM March 26, 2003
I'd like to welcome Simon Brunning to the JSR-666 expert group and commend him for his daring and brilliant "Rich Text Identifiers" proposal. I had always thought that colour-syntax-highlighting IDEs were just there to help code-weary programmers read, but now appreciate the central role they will play over the coming years.

Looking further though the comments on Simon's blog entry, I also noticed a gem from Mats Henricson:

I think we should add i18n here as well, so that "My button" can be the same as "Min knapp" ("My button" in Swedish).

Think about this. Such a simple change - requiring the the Java compiler to merely translate each identifier through all known languages - will certainly break down barriers to acceptance in many non-English speaking countries. Perhaps Babel Fish Translation would be an integral part of initial implementations?

A trivial extension would be to allow synonyms within one language to substitute for each other. For example, 'two', 'deuce' and 'doublet' all refer to the same concept, so what (sensible) Java program would possibly break if these identifiers referred to exactly the same variable?

In private correspondence, Charles suggested the compiler cope with small, obvious misspellings, a necessity in today's SMS culture. In a similar vein, allowing homonyms to substitute for one another may also be useful.

Here is a sample of the kind of code that we can expect to see, assuming that i18n, misspellings and homonyms, are all accepted into JSR-666, and subsequently into the Java language. It prints out the prime numbers less than ten:


for (nit eye = 1; me < 20; aye++) {

    if (self >=4 && 0 == (yoursTruly & 2))

        continyoo;

    if ((windowToTheSoul >> 3) != 0)

        brake;

    System.out.pintln(jag);

}

Note that, as with most JSR-666 proposals, this is able to be implemented wholly within the compiler, with no JVM changes required.

By alang | # | Comments (0)
(Posted to Software Development)
© 2003-2006 Alan Green