News for hackers. Stuff that matters.
Re:Kobayashi’s Maid Dragon Translation Notes by trinovantes on Thursday December 16, 2021 @02:11AM (#29575844)
I like how the function names are in English but comments are in Japanese

Don't most modern compilers allow utf-8 characters in symbol names?

Re:Kobayashi’s Maid Dragon Translation Notes by YouMeWeThem on Thursday December 16, 2021 @02:20AM (#29575894)
I'm a programmer in Japan. This is completely normal.

It looks ridiculous to have English syntax mixed in with Japanese variables, not great for legibility.

Re:Kobayashi’s Maid Dragon Translation Notes by makeitdouble on Thursday December 16, 2021 @05:11AM (#29576781)
UTF-8 is allowed, but it's a trap.

Nowadays it's less of an issue, but back in the days windows, mac and linux all used different default encodings. This meant that opening and saving the source file in one of the system could mess it all depending on the editor and how careful the devs are.

Also, there is the canonical writing issue, where you can write different utf-8 strings that all end up displayed the same. It's not an issue if it's just display text, it's a different story if you have a method that doesn't get called because the byte sequence was different, or more subtly hash indexes that seem to match but actually don't.

BTW there are companies that write some of the UT methods right in Japanese, as it matters less, and it's quite fun as there is less restrictions on what can be put in the identifier (full-width parenthesis, spaces, comma etc, are allowed in that context)

Re:Kobayashi’s Maid Dragon Translation Notes by Lammy on Thursday December 16, 2021 @02:23AM (#29575906)
Re:Kobayashi’s Maid Dragon Translation Notes by WGH_ on Saturday December 18, 2021 @02:31PM (#29607740)
Just for the record, in Russia, we write all identifiers in English and practically all comments in (sometimes broken) English as well. Russian comments seem heavily discouraged, but hey, it's possible there're places where there're not.
Re:Kobayashi’s Maid Dragon Translation Notes by Zababa on Thursday December 16, 2021 @05:41AM (#29576948)
In France it's common to have code in English and comments/documentation in French. Code in French is very rare.
Re:Kobayashi’s Maid Dragon Translation Notes by 5e92cb50239222b on Thursday December 16, 2021 @05:20AM (#29576834)
I am not from Japan, but do work in two languages other than English (both official here). This is pretty typical actually. English names for identifiers (sometimes badly translated or simply transliterated), local languages for comments.