This compiles in XE8 and places a soccer ball in the caption of a VCL label. No special font required.
This compiles in XE8 and places a soccer ball in the caption of a VCL label. No special font required.
var Emoji⚽️ : string;
begin
Emoji⚽️:= '⚽️';
label1.Caption := Emoji⚽️;
end;
Just because it works, doesn't make it a good idea.
var Emoji⚽️ : string;
begin
Emoji⚽️:= '⚽️';
label1.Caption := Emoji⚽️;
end;
Just because it works, doesn't make it a good idea.
My evil streak has been planning the worse code ever - all variables are Unicode characters which are visually quite similar.
ReplyDeleteThrow in some multi-variable "with"'s, lots of "goto"'s, some unwanted bugs features, all global methods (have I missed anything?) - it should be quite easy to fix...
We should hold a UTF-8 obfuscated competition. The source code which can best tell the purpose of the code - using mostly non-letters, and that compiles and executes, wins :)
ReplyDeleteI discovered not all Emoji compile as identifiers. Not sure the pattern.
ReplyDeleteWhat if change the font to Wingdings for the whole USE?
Lars Fosdal Is that a slippery slope we want to go on...? ;-)
ReplyDeleteThis could be a innovative way to comment code! :-)
ReplyDeleteIf by "innovative" you mean "annoying" then yes!
ReplyDeleteU+200F in the middle of some identifier wins the competition.
ReplyDeleteHey, as long as code completion is working, it's all good.
ReplyDeleteDoes this require Windows 8 / 10 for the emoji support? I tried XE8 on Win7 (with the Win8 backported emoji hotfix applied), and got only three unprintable characters, individually selectable.
ReplyDeleteNote bugs with bugs:
ReplyDelete// 🐜 here. CPU usage: 📈 and crashes on mobile 📵. 🔙🔚 still seems to work.
I don't think it is a bad idea using emoji as a basis for a variable / identifier or function name . Condenses visually a lot of concepts but how to be sure you have used the same concepts in your code.
ReplyDelete