Open In App

Bhailang – A Toy Programming Language

Coding involves a wide array of programming languages. A beginner might find the syntax intimidating. What about if there was a Hindi linguistic version of coding? After all these programming languages such as C, C++, and Python, here we have Bhailang, created by our own Indian engineers spawned out of inside jokes. Bhailang is a toy language written in Typescript. The term ‘toy language’ refers to any computer programming language that does not meet the standards for general purpose applications. 

Key Terminologies



Steps to try Bhailang:

Step 1: Environment Setup 



          Download Link: https://code.visualstudio.com/download

          Download Link: https://nodejs.org/en/

npm i -g bhailang

Installing bhailang

Installing Bhailang extension in Vs code 

Step 2: Create a file named gfg.bhai in a new project directory.

Bhailang files have the extension .bhai

We will start our program with hi bhai and end it with bye bhai. In this example, we will declare a few variables and explore the use of conditions and loops in Bhailang. 

Add the following code in gfg.bhai file.

// Entry point 

hi bhai

// bol bhai- prints the statements in console 

 bol bhai “Welcome to GeeksforGeeks!”;

 bol bhai “Let’s code in our Hindi Lingo using Bhailang”;

// Declaring the Variables 

  bhai ye hai a = 5;

  bhai ye hai b = 3;

// Sahi represents a boolean value True

  bhai ye hai c = sahi; 

  bhai ye hai d = galat;

// loop 

  jab tak bhai (b < 8) {

        bol bhai b;

       // if else construct

       agar bhai (b == a){

      bol bhai “b is equal to a”;

     bol bhai c; 

}

    warna bhai 

    bol bhai d ; 

    b += 1;

}

 // exit point 

bye bhai 

Step to run the program 

Run the program by using the following command.

bhailang <your file name > 

bhailang gfg.bhai 

Output

Bhailang Program Output 

Article Tags :