The entire code conversation in Bhai Lang revolves around the word “Bhai” (“bro” in Hindi) and while it is quite hilarious, it is also easy to pick up. For example, here’s Bhai Lang’s equivalent of “hello world”:
As you can see, the entrypoint for the program is “hi bhai” and the program must end with “bye bhai”. All code inside of these tags is considered valid and everything outside it is ignored.
Variables on Bhai-Lang are declared using “bhai yeh hai”. Null values are denoted using “nalla” and boolean values are denoted using “sahi” for true and “galat” for false. “bol bhai” is used to print something on the console.
If your code works fine, Bhai Lang says, “Shandaar bhai 🎉” and returns the output. But if you’ve made an error, it says, “❌ Arre Bhai Bhai Bhai !!! KYA KAR RHA HAI TU??”
The programming language also has conditional and loops, all based around the world “bhai”. Do check out their GitHub repo for details and documentation.
Once you get a hang of it, you can try your code at the Bhai Lang playground. Since it is all Hinglish, I guess you’ll brush up on basic Hindi while you have some fun tinkering with Bhai Lang.
Looking for something similar in Malayalam? Check out malluscript on GitHub.