• Riskable@programming.dev
    link
    fedilink
    English
    arrow-up
    8
    ·
    7 days ago

    I thought China wanted more people who could read and write code?

    Nobody codes in Mandarin! No, not even Chinese people.

    They code in English and for a reason! It’s not a great or reassuring reason, but it’s a logical one: English doesn’t have any accent marks and a simple, 26-character alphabet. This means the meaning of code can be understood by a compiler or interpreter without having to deal with encodings or enormous lookup tables to determine if a character is valid for say, an assignment (e.g. foo = 1).

    I’ve met developers that tried coding in their native languages using Python, which is one of the few languages that actually supports using non-latin Unicode characters and even right-to-left writing. They all say the same thing: It sucks and it’s not worth the trouble.

    • BillyNaCl@lemmy.zip
      link
      fedilink
      arrow-up
      2
      ·
      5 days ago

      Obviously, you don’t understand programming. Programming does not have a strict English proficiency requirement. What is used in programming are identifiers; they merely distinguish variables and have no strict requirement for meaning. You can absolutely use pinyin or arbitrary strings as identifiers. The English level required for programming is only enough to understand reserved words—they’re just basic words.

      • moth@anarchist.nexus
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 days ago

        Obviously, you don’t understand programming.

        obviously, you don’t understand Unicode. moth appreciates your wonderful example of irony. it is often those who speak loudest who understand the least.

        • BillyNaCl@lemmy.zip
          link
          fedilink
          arrow-up
          1
          ·
          2 days ago

          Moreover, no investigation, no right to speak. I write code in a Chinese-language environment every day—so how much code have you written in a Chinese-language environment?

          • moth@anarchist.nexus
            link
            fedilink
            English
            arrow-up
            1
            ·
            2 days ago

            I write code in a Chinese-language environment every day—so how much code have you written in a Chinese-language environment?

            sure you do, “Billy”. we both know you’re full of bullshit, but since you made a claim, support it with evidence.

            • BillyNaCl@lemmy.zip
              link
              fedilink
              arrow-up
              1
              ·
              7 hours ago

              Fine. What proof are you after? Anything I can provide, I’ll be more than happy to shove down your throat. Keep pushing—see where it gets you.

              • moth@anarchist.nexus
                link
                fedilink
                English
                arrow-up
                1
                ·
                2 hours ago

                give us a link to your github profile, Billy. one with a long history of code written in chinese. and edit the Github profile with a link back to your Lemmy profile, so that we know you own the account.

                also, since you’re more than happy to shove this down my throat, how do you type? do you use pinyin, or a bilingual keyboard? if it’s the former, a short video showing you typing code in whatever editor you use. make sure it’s from one of the projects from your Github. if it’s the latter, then a picture of your keyboard with a handwritten “BillyNaCl” note next to it.

                none of this would be unduly hard for someone who codes in chinese to provide for us.

        • BillyNaCl@lemmy.zip
          link
          fedilink
          arrow-up
          1
          ·
          4 days ago

          Yes, it is often those who speak loudest who understand the least, I can’t agree more, because that perfectly describes your behavior. No evidence, No proof, No example, just a viewpoint.

          • moth@anarchist.nexus
            link
            fedilink
            English
            arrow-up
            1
            ·
            4 days ago

            moth expected some attempt at a retort, but moth expected… more than just “no u”. moth assumed people grew out of that after they turned eight.

            but moth digresses. moth has no further interest in arguing with a brand new account that already has low rep warning labels next to their name. moth dismisses you.

            • BillyNaCl@lemmy.zip
              link
              fedilink
              arrow-up
              1
              ·
              2 days ago

              Thank you for your reply. I may indeed not be good at talking to people who lack logic. I prefer to refute arguments; without arguments, I can’t say anything more.

              • moth@anarchist.nexus
                link
                fedilink
                English
                arrow-up
                1
                ·
                2 days ago

                I may indeed not be good at talking to people who lack logic

                you’re just not good at talking, period.

                I can’t say anything more.

                moth doubts that. you seem compelled to have the last word.

      • Riskable@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 days ago

        Have you ever actually tried it? Simple example: Try using an emoji for an assignment: ⭐=foo or foo=⭐

        It doesn’t work? Why? Because emojis aren’t valid for assignments. Why? Because Python follows Unicode Standard Annex #31 (UAX #31). Since emoji are classified as symbols, you can’t use them for assignments.

        Who cares? We’re taking Mandarin, right? Except there’s a practical problem: The most common input method for typing Mandarin (and other languages with bazillions of characters) outputs full-width characters (e.g. = full width equal sign) and this screws everything up. It does this for equals, parentheses, commas, and a few other symbols.

        My friend said that was the most annoying thing: Having to constantly switch back and forth.

        However, many characters that are used as normal words also don’t work for assignments. For example, Chinese numerals: 一, 二, 三 (the English equivalent of, one, two, three)

        Then there’s a practical problem: It looks wacky AF, making the code harder to read:

        if 用户.is_active():
            return 获取数据()
        

        The input method editor problem is the biggest one because it really slows you down. Having to switch in and out of it constantly also creates huge friction when coding.

        I just asked him and he just gave me something I didn’t even think about: Apparently git diffs (on the command line) don’t display Mandarin characters properly! That right there would make programming in Mandarin a no-go situation without a special git tool.

        Apparently, if you want to be able to deploy your code at all you have to know English. Or at least, Linux English (e.g. ls and similar programs haha).

        • BillyNaCl@lemmy.zip
          link
          fedilink
          arrow-up
          1
          ·
          4 days ago

          You can’t even tell Pinyin from Chinese characters.

          Also, most Chinese input methods support toggling between half-width and full-width symbols independently. Even if you really want to program using Chinese characters, you just need to switch to half-width symbols.

    • AwesomeLowlander@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      7 days ago

      It’s not the govt’s stance, it’s a bunch of random dum dums online led by a guy who thinks his math tutoring skills qualify him to make strategic decisions.