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 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 an overview of the complexity of the other programming languages, and Bosque solves all the problems.
- Mutable State and Frames: Mutable objects are always a confusing part to handle in the code
- Loops, Recursion, and Invariants: To understand the problem of loops and recursion concepts in your development, you have to face this complexity.
- Indeterminate Behaviors: This is focused on an undefined area like an uninitialized variable
- Data Invariant Violations: Data Invariant violations for handling the collections
- 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.
- Extract the folder and copy it.
- Create a new folder ( ex : “bosque”) in .vscode folder & paste the folder ( ex : C:\Users\rvino\.vscode\ bosque).
- 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,
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.
Execute the command "Code hello.bsq".
Type the below code in the Visual Studio editor & save it.
- namespace NSMain;
- entrypoint
- function main(): String {
- return "Hello World Welcome to BOSque programming";
- }
Go to Node command prompt, execute the command "node bin/test/app_runner.js Hello.bsq". The output is displayed in the command prompt.
Conclusion
I hope you now understand the fundamentals of Bosque programming. We will learn more about Bosque in upcoming articles.