Slashdot Mirror


How Microsoft Rewrote Its C# Compiler in C# and Made It Open Source (medium.com)

Mads Torgersen, the lead designer of C# at Microsoft, remembers "Project Roslyn," which built an open-source, cross-platform compiler for C# and Visual Basic.NET "in the deepest darkness of last decade's corporate Microsoft: We would build a language engine! A unified, public API to C# code: We would redefine the meaning of "compiler". Of course, once you are building an API for the broad C# community, it is kind of a slam-dunk that it should be a .NET API, implemented in C#. So, the old dream of "bootstrapping" C# in C# was fulfilled almost as an accidental side benefit. Roslyn was thus born out of an openness mindset: sharing the inner workings of the C# language for the world to programmatically consume.

This in and of itself was a bit of a bold proposition in what was still a pervasively closed culture at Microsoft: We would share this intellectual property for free? We would empower tool builders that weren't us to better compete with us? The arguments that won the day for us here were about strengthening the ecosystem and becoming the best tooled language on the planet. They were about long-term growth of C# and .NET, versus short term monetization and protection of assets for Microsoft. So even without having mentioned open source, signing up for the cost and risk of the Roslyn project was a big and bold step for Microsoft....

F# released already in 2010 with an open source license and its own foundation -- the F# Software Foundation. The vibrant community that grew up around it soon became the envy of us all. Our team pushed strongly to have an open source production license for Roslyn, and finally a company-wide infrastructure emerged to make it real. By 2012, Microsoft had created Microsoft Open Tech; an organization specifically focused on open source projects. Roslyn moved under Microsoft Open Tech and officially became open source... C# language design and compiler implementation are now completely open processes, with lots of non-Microsoft participation, including whole language features being built by external contributors.

Torgersen's article says C# now enjoys "the scaling of effort via contribution of features and bug fixes, but also the insight and course correction we get through the instant, daily feedback loop that open source provides.

"It's been a long and wild journey, and one that to me is symbolic of the massive changes that Microsoft has undergone over the last decade."

3 of 85 comments (clear)

  1. Lulz by Anonymous Coward · · Score: -1, Troll

    "Linux is worse than cancer."

        -- Steve Ballmer

  2. Opportunity wasted by Gravis+Zero · · Score: -1, Troll

    If they wanted to actually contribute to the community then they would have made an LLVM frontend or submitted patches to Clang. Instead, they did what they always do, make a massive heap of code with nothing in common with anything.

    But hey, if you want bugs galore, this is the way to go.

    --
    Anons need not reply. Questions end with a question mark.
    1. Re:Opportunity wasted by xonen · · Score: -1, Troll

      People like you really need to get over your irrational Microsoft hate and take a leaf out of Torvald's book and go and get some professional help. You're exactly the sort of toxic open source community member he was talking about, because even when you've got literally everything you wanted from a formerly proprietary company - i.e. a complete open sourcing of one of their key products, you STILL bitch and moan at them and imply they shouldn't have done it. You're exactly the sort of person the OSS community doesn't need because you're exactly the sort of no-life vermin that pushes organisations and individuals away from contributing to it.

      With these kind of rants, i'd also suggest you are exactly the person the 'OSS community' (if such exists) does not need.

      It's also very interesting to see the amount of brainwash being done to you, to conclude that 'if you don't like MS you are not a good civilian/OSS member/technician/bla'.

      By the way. the reason people don't trust MS is most likely because they are a decade or 2 older than you, and actually remember what MS has done in the past first-hand, and also observe how most 'changes' from MS are actually double-bottomed party tricks. Open-sourcing some code will not erase such memories. Live with it - cause those 'unbelievers' are likely right and if not, have the right for their viewpoints as much as you - just you don't realize it.

      --
      A glitch a day keeps the bugs away.