You guys are crazy :)
/max (sent from my phone)
On 02/07/2009, at 12.24, Dmitry Geraskov <dgeraskov(a)exadel.com> wrote:
Sean Flanigan wrote:
> On 01/07/09 17:41, Max Rydahl Andersen wrote:
>>> My good friend dart once demonstrated for me that now in java you
>>> can
>>> actually use chinese / japanese characters in class and method
>>> names
>>> also.
>> Yes, Java support UTF-8 in their Java lang spec - one of their
>> selling
>> points when it came out, which luckily did not catch on too much.
>> I did have to do a consultancy gig once where they used Portuguese
>> words
>> and accents in the code....veery hard to debug :)
>
> Yeah, I think you can start a Java identifier with almost any
> character on the planet... except ASCII punctuation and the
> "arabic" digits 0-9. I think all the other Unicode digits are fine:
http://www2.hawaii.edu/~hlibcat/documents/246.html
Even more, following code will work fine:
public class Test {
public static void main(String[] args) {
int \u006d\u0079\u0056\u0061\u0072 = 1; /*int myVar = 1; \u002a
\u002f
System.out.println(myVar);
}
}
You should take this into account when you parse code. User could
close comment by unicode representation.
Eclipse colouring doesn't take it into account.
>
>> On the subject of translating code generated comments then I would
>> say
>> we shouldn't, it is simply too much work and we risk the examples
>> to go out of sync. It is more important that the code example runs/
>> works
>> than its comments are in a localized language.
>
> Yeah, that's my feeling too. I just wanted to make sure to have
> the discussion, since there are pro's and con's.
>
--
Best regards,
Dmitry Geraskov dgeraskov(a)exadel.com
Senior Developer
Exadel Inc