Let's make our code beautiful and attractive...
Let's code with emojis!
In this article I'll cover Introduction to Emojicode -> 1st article/blog of 3 part series.
What is this - programming in emojis π?
Yeahhh.. programming with emojis.
Emojicode is an open-source, strongly-typed programming language consisting of emojis created by Theo Weidmann.
Let's begin! π€©
So before getting to the basics of programming, let me tell you where you can code this language.
- You can run your Emojicode programs locally by following the steps of installation on their main website: Install Locally
- You can start right away using the online editor of TIO: Online TIO Editor
Extension:
We write Emojicode programs in files with the extension .emojic
or .π
Basic Structure:
All code will be inside π block. The π block indicates all the code that should run when the file is executed.
For larger programs, we use π and π to add more blocks.
π --> the start of the code block
π --> the end of the code block
So, basic emojicode file will look like this:
π π
code here..
π
Print stuff:
To print in Emojicode, we use the π βοΈ
π code to print.. βοΈ
Strings:
If you have ever worked with a programming language then you must have worked with strings. But for newbies - Strings are a form of data type for computer. Strings are pieces of text.
Strings in Emojicode has to be wrapped around π€
Here's an example of printing a string in emojicode:
Comments
Comments are lines of code that you don't want to execute. Comments can explain what the code is doing or leave instructions.
There are two types of comments:
- Single-line --> comment out a single line and starts with a π in emojicode.
- Multi-line --> comment out multiple lines and starts with ππ and ends with ππ in emojicode.
π π
π single-line comment
π printing a string
π π€Practicing commentsπ€βοΈ
ππ Multi-line comment ππ
π
TIP: Press
Win + .
key combination on windows orControl + Command + Spacebar
on mac to bring the emoji keyboard.
Top comments (8)
I always love learning about wacky languages like this! BrainF and LOLCODE are particularly fun as well.
Indeed they are! They give much more motivation to code than other languages.
I'm thinking about the actual use cases of programming languages likes this one haha
Very true XD
it's awesome, what an excellent idea. I'm giving 100% to this.
Thank You π!
Pulling in a Emoji seems like to much work =]
If you are on windows, then press win+. key combination and type the emoji to search and click - not that work! =]