DEV Community

Cover image for All That You Need to Know About Microsoft's New Programming Language: Bosque

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

Yaser Al-Najjar on April 20, 2019

What is Bosque? From Bosque GitHub repo: The Bosque programming language is a Microsoft Research project that is investigating languag...
Collapse
 
drbearhands profile image
DrBearhands

It's not a new paradigm. It's strongly-typed purely functional programming. It's been around for a while. In fact I don't really see any value as a research / academic language here. I've gone through the list of features and it seems everything has already been done, even better, by some existing languages. Just not C, JS, or Python, but that's not the competition in R&D. There it's Haskell, Clean, ATS, Idris, Mercury...

It just looks like a shitty grab for power. A tactic Microsoft is well-known for.link

Collapse
 
yaser profile image
Yaser Al-Najjar • Edited

The regularized programming paradigm is not meant to bring new features, as it says clearly "it eliminates sources of complexity"... so basically, it's a paradigm that takes out what the author thinks as "complex".

Look at it like this, we had the procedural programming paradigm, in which we are using pointers in C.
Just by switch those local variables from stack into the heap... whoops, we have objects.
And, we do point to the object father... whoops, we have inheritance.
Lastly, we override the function pointer with another function pointer... we have polymorphism!

  • Encapsulation already existed with structs.

Voila, we derived OOP paradigm!
Sounds similar to the regularized programming paradigm, right?

That being said, you can start using regularized programming on languages that supports functional programming, like Python or JS.

Collapse
 
yucer profile image
yucer • Edited

The sources of complexity are not in the programming languages, they come from the nature of problem domains.

That's why domain specific languages shine, they offer few sentences but those are the one needed in the context of that problem domain.

That's also the reason why some languages are better than other for specific tasks and worst for others. For example: perl is very good for text matching and processing, but it might not be so good to build the abstractions needed for a given domain.

Even ASM language is preferred for coding some operations that are near to low level control of external devices (programming drivers for external hardware, controlling microchips) or bit-wise memory operations. And that's because it was designed to that problem domain.

Every programming paradigm has its own set of languages that fit better for the task.

Nevertheless it is true that in the history of programming a lot of unnecessary constructs have been built because the needed programming theory was not available or was not considered. Some examples are the goto sentences, and some people says that abstract clases (some computer scientists argue that abstract clases are not needed if the language has a good support of types, interfaces). Other experts are against of sentences that break the loop, because they say no sentence should contradict a previous one.

If the goal is to find the canonical set of sentences that allows to drive the complexity needed by a general purpose language then I am agree, it is an interesting work.

Nevertheless, if the goal if to go back to old programming paradigms just because the new ones are lacking some features then I am not so happy.

I have programmed the last 30 years, using a lot of this paradigms. There procedural programming paradigm lacked the capacity to easy handle a lot of complexity of the problem domain. I was already programming with structs when the object oriented paradigm came. A lot of people tough at first glance that objects where structs + methods. It took a time to see the additional benefits that OOP has for re-usability and driving the complexity of the problem domain. And that was only possible by mean of reading of the theory.

Per see, javascript is not a danger to the industry. The danger is that newcomers start to learn by javascript, and the past of the programming theory is forgotten.

There is a quotation that says "Those who cannot learn from history are doomed to repeat it".

I would say: If somebody wants to go back to procedural programming paradigm because his tech stack uses it, perfect. But he should be aware that is not the better way to handle the complexity of some problem domains. The complexity would crystallize in form of additional code and new concepts and abstractions. It would eventually precipitate over the solutions whose nature is from that problem domain.

Thread Thread
 
yaser profile image
Yaser Al-Najjar

I totally agree with you.

Domain has been always the main the source of complexity, and a new paradigm won't be able to swipe off complexity just because it's more bullet-proof.

Coming from the reverse code engineering field, I would say that the keyword goto has still its use-cases, such as creating code obfuscator / protector (by using JMP in ASM).

But, as you said there are just "off" parts of some paradigms like the keyword goto that causes more harm than good in most scenarios.

I just hope that in the future we won't see developers promoting this paradigm for all kind of scenarios as we saw with TDD and micro-services!

Per see, javascript is not a danger to the industry. The danger is that newcomers start to learn by javascript, and the past of the programming theory is forgotten.

You know what I love about JS and Python?

They give us all the power (allow all different kind of syntax/paradigm in a simple way), then they tell us: "do what you want... however you want" :D

Collapse
 
drbearhands profile image
DrBearhands

A reduction of complexity is still a feature. It doesn't do anything new in that department either; it just copied purely functional programming and put a new label on it.

Collapse
 
preetjdpdev profile image
Preet Parekh

One might say "that was the old microsoft".
Seeing all the investments they are making into oss, they might be onto something

Collapse
 
drbearhands profile image
DrBearhands • Edited

A skeptic would say this is part of they "embrace, extend, extinguish" strategy. The link I posted details how their current OSS investments contribute to just that.

Thread Thread
 
preetjdpdev profile image
Preet Parekh

Thanks for sharing the video, everything makes more sense

Collapse
 
rhymes profile image
rhymes • Edited

Thanks Yaser for the explanation. It wasn't as clear just by reading the README.

I guess we'll see in the future. Languages usually stick around because they are solving at least one issue programmers are having, in combination with some marketing and the right early adopters.

Could this be also a playground for new TypeScript features?

(lol for the person asking after 5 minutes the project has been released if they can use async/await :P)

Regarding the topic of solving "accidental complexity" I'm waiting for the release of Dark (though I never understand why programmers would use generic words to name their language :D). The aim of Dark is bigger I guess, they aim to decrease all complexity, not just in the language but in the tooling as well. I believe it's built in OCaml.

You can read a DEV post on it as well:

Let me know your thoughts about both things!

Collapse
 
yaser profile image
Yaser Al-Najjar • Edited

You know what I love about your comments, rhymes... I always learn something new from them!

This is the first time I hear about Dark, I've gone through their website and so... all are marketing information, nothing really technical.

What interested me, is the team behind it... one is the founder of CircleCI and another was a product manager at KickStarter. Surely, they will get tons of funding!

Can't wait to see the actual product in the future...

in combination with some marketing and the right early adopters.

This says it all 😆

Could this be also a playground for new TypeScript features?

To be honest, I don't see any potential feature... I just see a whole different perspective of programming (that says it's less error-prone), and many programmers are gonna promote that (if proven successful).

Collapse
 
krumpet profile image
Ran Lottem

A new language always sounds exciting. The example looks like a regular map over a list, though. Is there something else in the example?

Collapse
 
yaser profile image
Yaser Al-Najjar

Please check this comment: dev.to/0xrumple/comment/a970

Collapse
 
fardeen9983 profile image
Fardeen Khan

It may sound interesting to explore q new language and if it does improve upon shortcomings of popular concepts then why not. But as you pointed out it is strictly for exploring better programming concepts and research.
To be honest I already have my hands full learning popular languages and their frameworks which are good for a particular niche of work and not so good for other, i wouldn't mind ignoring it all together.
Lastly what are your thoughts on Julia the general purpose language also good enough for computation, tasked with starting a new era of programming by bringing all the goodies from previous languages.

Collapse
 
yaser profile image
Yaser Al-Najjar

Yeah, a new approach every since in a while in programming has been always the norm. This industry, software, always love new stuff!

I've gone through Julia docs, and I think it's really great; not sure though if what they are promoting: "Julia is fast" is just an implementation detail (to how they implement it in each platform).

It really has an appealing syntax, especially for the parallel computing part:

docs.julialang.org/en/v1/base/para...

I hope it won't be like R (focused just on data science stuff).

Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

Hmm, is there another example. The mapping is something you can do now in JS, Python, C++, Haskell, etc.

Collapse
 
yaser profile image
Yaser Al-Najjar

I'm not sure that we will see a new feature (though the author says there are unusual features), as I mentioned in the previous comments... it's all for the regularized programming paradigm (which the author says it's less error-prone).

More on this in this comment: dev.to/0xrumple/comment/a970

Collapse
 
preetjdpdev profile image
Preet Parekh

Does seem intresting but doesn't tell me how its better than any other language.

Collapse
 
yaser profile image
Yaser Al-Najjar • Edited

IMHO, the programming language itself does not provide any super duper features, it's just a more of proof of concept (PoC) for the regularized programming paradigm.

More on this in this comment: dev.to/0xrumple/comment/a970

Collapse
 
arkaprovob profile image
Arkaprovo

Hi Yaser. Thanks for this article!. I think we need more programming language. Totally agree with you with the term you used "very non-Microsoft'ish" xD

Collapse
 
guico33 profile image
guico33

Not exactly the first one though

github.com/Microsoft/vscode

Collapse
 
yaser profile image
Yaser Al-Najjar

You're welcome :)

Collapse
 
nimahkh profile image
Nima Habibkhoda

it has not very intresting features for migration. in my opinion it is a library on node.js . not a programming language

Collapse
 
yaser profile image
Yaser Al-Najjar

Use the browser dev tools to get rid of them 😁