Logo

dev-resources.site

for different kinds of informations.

Hello World: Emojicode

Published at
4/2/2022
Categories
helloworld
esolang
emojicode
Author
viviandai
Categories
3 categories in total
helloworld
open
esolang
open
emojicode
open
Author
9 person written this
viviandai
open
Hello World: Emojicode

Now let's take a look at Emojicode. Emojicode was built on C/C++ and like its name suggests, this is a programming language that uses emojis.

Code

Call the file hello.πŸ‡ or hello.emojic if your computer doesn't have emoji support.

πŸ’­πŸ”œ
Hello World
First Emojicode program
πŸ”šπŸ’­
🏁 πŸ‡
  πŸ˜€ πŸ”€Hello, World!πŸ”€β—οΈπŸ’­ Prints "Hello, World!"
πŸ‰
Enter fullscreen mode Exit fullscreen mode

How Does This Work?

Let's break this code down step by step:

Comments

The first part

πŸ’­πŸ”œ
Hello World
First Emojicode program
πŸ”šπŸ’­
Enter fullscreen mode Exit fullscreen mode

is a multiline comment. Emojicode does have a documentation style for classes, protocols, etc. Multiline comments usually are put at the header of a file to give a quick description of the file.
πŸ’­ is the symbol for a single line comment so πŸ’­ Prints "Hello, World!" is ignored by the compiler.

The Start of a Program

Each Emojicode program has 🏁 to mark the starting point of the program. πŸ‡ is pretty much the equivalent of { and πŸ‰ is the equivalent of }. An Emojicode program should have the format of

πŸπŸ‡
    πŸ’­code here
πŸ‰
Enter fullscreen mode Exit fullscreen mode

Printing

πŸ˜€ indicates the start of a print

❗️ indicates the end of a print

πŸ”€ indicates the stuff in between is a string (basically β€œ in common programming languages)

Conclusion

Emojicode can actually be used to do a surprising amount of things. While I personally have not tried, the language does support object oriented programming, threading, potentially some functional programming as well. Hello, World! is far from reaching the full potential of Emojicode but it's somewhere to start.

Comment a language you'd like to see next!

Featured ones: