• farmgineer ( farmgineer@nord.pub ) 
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 days ago

    I’ve worked in Japan for years which has plenty of people terrible at English, especially in the older generations. They find (or these days google/ai/whatever translate) any documentation they need and just learn the various built-in names for things as needed. This doesn’t stop them from programming. There are websites where people have done that and uploaded the resulting translation and/or answer questions in Japanese about things. I stumbled upon similar sites in Chinese by accident.

    Identifiers in code that didn’t support non-ascii identifiers were just romanized Japanese (and I assume Chinese does this as well). So print(zeikomi_nedan); or something where that is the variable name. They don’t redefine alias print in some library or something (though I’m sure a small minority might, I’ve never seen it).

    I have seen some kanji-based identifier names in languages with default utf-8 support, but I still don’t think that’s the norm, especially if non-Japanese-speakers are expected to read the code such as in shared projects.

    • Riskable ( riskable@programming.dev ) 
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 days ago

      Japanese doesn’t count because half the words for things are just English with a Japanese accent!

      Drink your koohii and maybe have an aisu kuriimu later to understand what I’m talking about 😁

      • farmgineer ( farmgineer@nord.pub ) 
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 days ago

        But they don’t always mean what you think 写真はイメージです。 is a classic. “[the] picture is an image”. Of course it is! Well, except it means image in the sense of a representative sample image, not an image of the exact thing. It’s basically a disclaimer they put on product images in case it doesn’t look exactly alike.

        • Riskable ( riskable@programming.dev ) 
          link
          fedilink
          English
          arrow-up
          1
          ·
          3 days ago

          Yes yes. You don’t need to remind us all that Japanese is stupidly complicated. Everyone who’s watched a bit of anime knows that 🤣

          Sooo… Let’s say you want to actually use Japanese in your code. Which of the three writing systems would you choose?

          Also, do you start counters at zero or do you…

          Noun + Particle + Number + Counter?

          I mean, it must be a real pain to first have to figure out what it is you’re counting before you can actually start the index 🤔

          Also, make sure your fonts follow the shinto stroke ordering! Otherwise your schoolteacher will haunt you from their grave and curse your program!

          😁

          • farmgineer ( farmgineer@nord.pub ) 
            link
            fedilink
            English
            arrow-up
            1
            ·
            3 days ago

            Having worked at a company where all the code was written by Japanese for Japanese-speakers, it’s just nouns in romaji for variables, something verb-y for functions. Some function names had particles as a part of that (still in romaji). No counters that I recall in code (though used in comments).