All That You Need to Know About Microsoft’s New Programming Language: Bosque

What is Bosque?

From Bosque GitHub repo:

The Bosque programming language is a Microsoft Research project that is investigating language designs for writing code that is simple, obvious, and easy to reason about for both humans and machines

Lemme add a couple of points

Bosque is typed and functional.
Heavily affected by JavaScript, TypeScript, and ML.
More of a research product than a profitable product.
An open source project licensed under MIT (very non-Microsoft’ish 😁).

When was it invented?

The GitHub repo was created on 3rd of Mar, 2019, and published on on 15th of April, 2019.

What’s the implementation of the language?

Currently, the language is implemented on TypeScript which runs on Node.js.

So, what does it bring new into the table?

Maybe a new era of programming

The author of Bosque, Mark Marron, introduces a new programming model called Regularized Programming.
In his research paper, he mentions how structured programming (that we knew since 1970) might cause “accidental complexity"!

We believe that, just as structured programming did years ago, this regularized programming model will lead to massively improved developer productivity, increased software quality, and enable a second golden age of developments in compilers and developer tooling.

How Regularized Programming Differs from Structured Programming

You can simply say that: "Regularized Programming = Structured Programming v2.0".
That’s how Marron tells us in his white paper, that regularized programming is built on structured programming… but, it aims to eliminate sources of complexity.
In other words, fewer bugs in your code!
The sources of complexity he mentions are:

Loops, Recursion, and Invariants: I assume you already know those 😆
Mutable State and Frames: mutable vs immutable objects are always confusing.
Indeterminate Behaviors, like: uninitialized variables.
Data Invariant Violations: accessing/modifying data using index in arrays and such.
Equality and Aliasing: by value, by reference variable passing.

Code sample

Instead of doing the usual iterative loop in C, e.g:
Multiply all array elements by 2.
int a[5] = {1, 2, 3, 4, 5};
int b[5];
for(int i=0; i<5; i++) b[i] = a[i]*2; Bosque avoids the whole idea about looping and accessing array directly from the memory by doing: var a = List[Int]@{1, 2, 3, 4, 5}; var b =[Int](fn(x) => x*2);

It’s all academic for now

Now, don’t jump to use this in your company or workplace 😆
Cuz, the whole thing is academic and meant for R&D for the next programming languages generation.
Quoting from the project repo:

we do not recommend the use of the Bosque language for any production work and instead encourage experimentation only with small/experimental side projects at this point in time.

Fun fact

People are already questioning the async model for this programming language 😂

Bonus fun fact

OP: There will likely be job offers in the next few weeks asking for a couple years of experience with this new programming language.
Re: And there will be people applying with 5 years experience already too 😛

What do you think

Do we really need a new programming language with a whole new paradigm?
Would it be really useful to have Bosque?