One minute
Programming with emoji
I really need to use emoji as variable names!
cit. Nobody
This is a perfectly valid C+ statement:
printf("👋🌍!\n");
But also this:
int 🦆 = 0;
So why using normal variable names anymore?
#include <stdio.h>
typedef int 🍺;
#define 🌮 main
🍺 🌮() {
🍺 🐤= 1;
🍺 🍕= 0;
🍺 🔥= 0;
for (🍺 🐱= 0; 🐱< 10; 🐱++) {
🔥=🍕;
🍕=🐤+🍕;
🐤= 🔥;
printf("%i\n", 🍕);
}
}
Now go, and replace all you variables name with emoji! Note: your colleagues may not be happy later on…
Some implementation details are available on GCC documentation, and looks like it support has been around for a while.