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
24Comment deleted
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
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
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
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
Emojis in C vars: the refactor that'll make your grep regexes obsolete and merge conflicts a Unicode horror show
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
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 😎
in c++ u can already use emoji, lol Comment deleted
Depends on the compiler Comment deleted
g++ 10 has support for unicode variable names, clang++ also Comment deleted
i have only gcc 9 installed, so will show on clang Comment deleted
there is g++ 10 showcase on unicode variable names https://godbolt.org/z/bTGPed Comment deleted
Does it work fine with string functions like reverse? Comment deleted
what do you mean? Comment deleted
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++ Comment deleted
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 Comment deleted
Bruh Comment deleted
swift devs 😎 Comment deleted
why Comment deleted
👍 Comment deleted
Собралась куча русских и строит из себя англичан😁 Comment deleted
да Comment deleted
Keep it going ;) Comment deleted
no Comment deleted