BhaiLang: A toy programming language syntaxes use Hindi slang

A new toy programming language that uses Hindi slang instead of typically sophisticated syntax which is written in TypeScript language.

A day before, people started using BhaiLang to create funny material and shared it over social media, getting a huge response in terms of engagement.

Let us see the syntax of BhaiLang in the following article.

You can download and install the project on your local system and run it with the help of the npm package manager but before installing it on a system we will run it on Playground to test out the syntax.

First Hello World programm in BhaiLang

Whenever we start learning a new programming language, we always start with the HelloWorld program, and the same we will do with BhaiLang too.

In a typical syntax, it starts with “hi bhai” (hey dude) and ends with “bye bhai” (bye dude). Inside that, you can put your statements. Like, if we need to print “Hello World”, then you need to use bol bhai (speak dude), similar to Java’s “System.out.println” and it prints the output with the highly motivating word “Shandar bhai” (Dude, you have done fabulous work)

Hello world programm in Bhailang

And if you make some mistake, then it will print “Arre Bhai Bhai Bhai !!!” with a heart-touching message. Kya kar rha hai tu??…zero se divide ni karte (Hey Bro! what you are doing…don’t divide by zero).

BhaiLang funny error message

When you say, “Hey Bro!”, then Indians don’t get affected, but once you say “Bhai bhai”, which is something inexpressible by word.

You can find many syntaxes which are available online for your use.

Let me show you some more interesting primitive types.

The basic primitive types for strings, characters, and integers are similar to those in other programming languages. What I like is the boolean types shai (true) and galat (false)

And all we get worried about is the null values, so they have made the null value to epic one nalla (useless).

After reading a wonderful piece of code written by someone, I couldn’t control my emotions and burst out with joy.

The translation is of no use if you can’t understand it

You can read more about the syntax from the documentation section of Github and you can also try your creativity on BhaiLang playground without installing it on your system.

Please do let us know your thoughts about BhaiLang in the comment section.

Leave a Reply