Introduction To Bosque Programming LanguagešŸ˜

In this article, I have given an overview of Bosque Programming language.

Bosque Programming Language 

 

Bosque is a new open-source programming language from Microsoft. The main aim of this language is to provide ways to avoid accidental complexity in the development and coding process and improve the developer productivity as well as software quality by enabling a range of new compilers and developer tooling experiences. 

Mark Marron ( Microsoft Researcher) created this language on March 3, 2019 and published it on April 15, 2019. He has mentioned the source of complexity in five different sections. (Bosque is a Spanish word that means forest.) Below is the overview of the complexity of the other programming languages, and Bosque solves all the problems.
  1. Mutable State and Frames: Mutable objects are always a confusing part to handle in the code
  2. Loops, Recursion, and Invariants: To understand the problem of loops and recursion concepts in your development, you have to face this complexity.
  3. Indeterminate Behaviors: This is focused on an undefined area like an uninitialized variable
  4. Data Invariant Violations: Data Invariant violations for handling the collections
  5. Equality and Aliasing: Handling pointer concept ( By Value and By Reference) 

Next Version of Structured Programming

 
Bosque programming is created based on Structured Programming ( we can say it the next version of structured programming), and this language is called “Regularized Programming.” This language is inspired by the syntax of TypeScript and type plus ML and Node.JS inspired by semantics.
 
NOTE
This programming is at an early stage.
 
Let's install Bosque and write the "Hello World" program.
 

Installation Steps

  • Make sure Node.js and TypeScript are installed on the PC.
  • Go to GitHub: https://github.com/Microsoft/BosqueLanguage & download the zip folder.
Bosque Programming language
  • Extract the folder and copy it.
  • Create a new folder ( ex : “bosque”) in .vscode folder & paste the folder ( ex : C:\Users\rvino\.vscode\ bosque).
 
Bosque Programming language
  • Open Node.js command prompt , go to the bosque\ref_impl folder and execute the below command.

    npm install && npm run-script build && npm test,
Bosque Programming language
 
That's it. Bosque is installed successfully.
 
Let's write the “Hello World” program now.
 
To write the program, we are going to use Visual Studio code. Visual Studio Code extension is not available right now but we can add the extension manually. Copy the folder “bosque-language-tools” into .vscode/extension folder.
 
Bosque Programming language
 
Execute the command "Code hello.bsq".
 
Bosque Programming language
 
Type the below code in the Visual Studio editor & save it.
 
Bosque Programming language 
  1. namespace NSMain;  
  2.   
  3. entrypoint function main() : String  
  4. {  
  5.     return "Hello World Welcome to BOSque programming";  
  6. }  
Go to Node command prompt, execute the command "node bin/test/app_runner.js Hello.bsq". The output is displayed in the command prompt. 
 
Bosque Programming language
 

Conclusion

 
I hope you now understand the fundamentals of Bosque programming. We will learn more about Bosque in upcoming articles.

Happy Reading!!!