Skip to content
DevMeme
1938 of 7590
CodeQuality Post #2153 · source on Telegram

When a student discovers UTF-8 identifiers

Description

The image is a composite meme, structured like a post on an educational Q&A platform, likely Piazza. The top part displays a student's question titled 'gcc 10.2 support'. The student asks, 'Can the autograder be modified to use gcc 10.2 so that we can have emojis in our variable names?' and provides a C++ code snippet for reference: 'int 😎 = 1; std::cout << 😎 << std::endl;'. Below this absurd request, under the section for 'the instructors' answer,' is a picture of a man in a suit with a deeply perplexed, concerned, and slightly pained expression. This reaction image perfectly captures the silent despair of an instructor or any senior developer when faced with a request that is technically possible but represents a flagrant violation of coding standards, readability, and maintainability. The humor lies in the student's naive enthusiasm for a 'feature' that is professionally abhorrent

Comments

24
Anonymous ★ Top Pick The fact that the compiler supports this is a testament to the Unicode consortium's thoroughness. The fact that a student wants to use it is a testament to why senior devs have trust issues
  1. Anonymous ★ Top Pick

    The fact that the compiler supports this is a testament to the Unicode consortium's thoroughness. The fact that a student wants to use it is a testament to why senior devs have trust issues

  2. Anonymous

    We’ll totally bump the autograder to GCC 10.2 so you can name a variable 😎 - right after compliance approves UTF-8 identifiers, security whitelists that code point, and the last revenue-critical daemon still on GCC 4.4 decides to peacefully retire

  3. Anonymous

    The autograder is running on CentOS 6 with a regex from 2003 that assumes all valid identifiers fit in ASCII, but at least it's dockerized so we can reproduce the exact same Unicode parsing failures locally

  4. Anonymous

    The students want GCC 10.2 for emoji variable names. The instructors' silence speaks volumes - because when your code review consists of 😂💩🔥, you've achieved the rare feat of making COBOL variable names look like a model of clarity. At least 'CUSTOMER-ACCOUNT-BALANCE-AMOUNT' tells you something; '🚀' could be a rocket ship, a deployment script, or just your career trajectory after this PR

  5. Anonymous

    Emojis in C vars: the refactor that'll make your grep regexes obsolete and merge conflicts a Unicode horror show

  6. Anonymous

    Sure, let’s bump the autograder to gcc 10.2 - UAX#31 will still veto 😎 as an identifier, but after the container rebuild and ABI roulette, at least the change request compiles

  7. Anonymous

    Upgrade the autograder to GCC 10.2 so we can use emoji identifiers? Perfect - nothing says reproducibility like “libstdc++.so.6: GLIBCXX_3.4.28 not found” caused by int 😎

  8. @bit69tream 5y

    in c++ u can already use emoji, lol

    1. @Alexmitter 5y

      Depends on the compiler

      1. @bit69tream 5y

        g++ 10 has support for unicode variable names, clang++ also

        1. @bit69tream 5y

          i have only gcc 9 installed, so will show on clang

          1. @bit69tream 5y

            there is g++ 10 showcase on unicode variable names https://godbolt.org/z/bTGPed

          2. @kseniadumpling 5y

            Does it work fine with string functions like reverse?

            1. @bit69tream 5y

              what do you mean?

              1. @kseniadumpling 5y

                I heard that emoji (and unicode) sometimes has funny side-effects with some basic string functions. But I’m not quite sure if it was about C++

                1. @bit69tream 5y

                  oh, i understood unicode symbols are bigger than regular char, so when u trying to do some operations on them, u should use something like wchar

  9. @procrastination_and_tea 5y

    Bruh

  10. @p_0xbadf00d 5y

    swift devs 😎

    1. Deleted Account 5y

      why

    2. @freeapp2014 5y

      👍

  11. @Agent1378 5y

    Собралась куча русских и строит из себя англичан😁

    1. @bit69tream 5y

      да

    2. dev_meme 5y

      Keep it going ;)

    3. @dmytrijza 5y

      no

Use J and K for navigation