top | item 36422670

Microsoft rewrote Q# compiler in Rust

75 points| avestura | 2 years ago |github.com | reply

97 comments

order
[+] avestura|2 years ago|reply
It was previously written in C# and F#: https://github.com/microsoft/qsharp-compiler
[+] nwah1|2 years ago|reply
Was there a write-up of what the goals of the rewrite were, and why they switched the language and made the new engineering decisions?
[+] systems|2 years ago|reply
Well Rust was written OCaml on which F# was based So i think this was probably for performance, not for any expressive reasons

And personally i consider Rust to be from the OCaml/SML family of languages similar to F#, so i guess they moved within the family

[+] pjmlp|2 years ago|reply
I guess yet another minus for F# at Microsoft. Really funny how they manage it.
[+] FrustratedMonky|2 years ago|reply
So sad. Love F#, and Q# seemed like a natural extension, or at least brotherly.

At a high level, it seemed like F# is more functional like OCaml, than Rust is. I'd like to hear more about the reasoning, was it just performance? How different was it to justify a re-write?

[+] asylteltine|2 years ago|reply
Why not…just use rust then? I don’t understand the point of all of these niche languages in real life. Python, Go, rust, c, cpp, js, C#, kotlin, but why use others? Each of these have clearly defined strengths and community support.
[+] hu3|2 years ago|reply
While I understand your sentiment, Q# is specialized for Quantum Computing: https://en.wikipedia.org/wiki/Q_Sharp

It's arguably different enough of a domain to justify a new language.

[+] proc0|2 years ago|reply
There are multiple dimensions of trade-offs from which to choose from, i.e. runtime speed vs. convenience of writing, complexity of learning vs. powerful type systems, etc.