DEV Community

Cover image for Hello World: Emojicode
Vivian Dai
Vivian Dai

Posted on • Originally published at viviandai.hashnode.dev

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!

Top comments (0)