7 ms·
Everyone on Roslyn is really excited about this and we hope that it serves as a signal that big things are happening in .NET to make the entire platform more op
by Locke1689 13y ago
Everyone on Roslyn is really excited about this and we hope that it serves as a signal that big things are happening in .NET to make the entire platform more open and agile!
P.S. We're the Visual Basic compiler too :)
- netcraft 13y agoas someone who doesn't know a whole lot about the .net ecosystem - does this open the possibility for writing server side c#.net web applications that run on linux, with full parity with the windows environment? with or without mono?
- Locke1689 13y agoThe C# compiler is written in C#, so you can use it anywhere with a .NET runtime. Microsoft doesn't ship a .NET runtime for Linux, so you'll have to use Mono, but if your app is compatible with Mono, you're good to go!
- amaks 13y agoIs Mono able to compile Roslyn?
- Locke1689 13y agoI assume you mean the Mono C# compiler (the one that the Mono team develops). Interestingly, no -- but neither can the native C# compiler (that's what we call the old C# compiler that everyone's using in VS right now)! Why? The C# compiler is bootstrapped, so we actually compile the compiler with the compiler. It just so happens that a while ago we felt we needed a feature so badly for the C# compiler that we introduced it into the C# language (exception filters) and started using it in the compiler immediately. So in order to compile the compiler, you need a C# compiler that supports exception filters, which right now is just the Roslyn C# compiler. Honestly, the feature (and some other small changes we've made) aren't that complicated, so they could be backported to other compilers, but I don't know why you would want to do that.
- deleted 13y ago[deleted]
- maximilianburke 13y agoHeh. A few years ago I was on a small team working on a .NET compiler and runtime -- it compiled MSIL into native code targeting x86 and PowerPC. I remember when working on the part of the compiler that built the exception handling routines running into exception filters and wondering what they were for. We were largely targeting C# as a development environment at the time but ended up implementing them in case anyone wanted to use VB.NET. Funny to see that they're now making their way back into C#, even if it's just in the compiler :)
- Locke1689 13y agoIn certain cases, especially with async, using "throw;" can cause a loss of information in a dump. We want compiler bugs to fail fast -- to immediately crash the compiler for debugging and analysis. By using exception filters we can immediately crash the compiler in erroneous conditions, preserving stack, locals, etc. This isn't just useful for the compiler, but we felt it was necessary for us to make the most reliable, agile product.
- kyllo 13y agoIt should. Here's the Roslyn source, and it looks to be all in C# and VB: http://roslyn.codeplex.com/ http://roslyn.codeplex.com/
- Revex 13y agoHow does something like this happen? How can you write a compiler in the language that it is supposed to be compiling?
- kyllo 13y agoThey wrote the original C# compiler in a different language (probably C++) first. Then they wrote the second C# compiler in C#, and used the first compiler to compile the second compiler. Voila!
- Locke1689 13y agoWe regularly dogfood, so we're on like N iterations of your structure, but that's the idea!
- jevinskie 13y agoCould you ask around the office and find out some of the details about the C# bootstrap process? I would be fascinated to know what language the non-C# compiler was written in and also how long they used/improved the non-C# compiler until they switched to the C# compiler. This source release is so cool!
- Locke1689 13y agoOh, the old compiler is just the currently shipping compiler (i.e., the one in a clean install of VS 2013). We've been using and maintaining it since the beginning. It's written in C++, so we refer to it as the "native compiler." We only stopped bootstrapping using the native compiler about, oh, 6 months ago, since that was when we decided to take a dependency on new language features. The next VS will be the first VS where Roslyn is the default C# compiler.
- jevinskie 13y agoOh I see, I didn't realize the native compiler was being used the whole time. Thank you for the insight!
- stusmall 13y agoFrom an open source neckbeard to a MS employee, thanks!!! Man, this is a crazy world. Cats and dogs living together. Open source MS projects. The falcon cannot hear the falconer
- Locke1689 13y agoHeh, before joining the C# compiler team I actually hacked on a stripped down Linux kernel and VMM targeted at high performance computing, contributed to ffmpeg and QEMU, ran Arch Linux with xmonad as my main machine, and did my Masters' thesis on Racket in Git, so I'm pretty used to open source. This is basically old hat for me -- I'm just glad Microsoft agrees it's the way to go. :)
- paperwork 13y agoSo does that mean one can reasonably expect to use official F# implementation(compiler, vm, libraries) in Linux within the coming months/years?
- migueldeicaza 13y agoF# is already distributed with Mono as it is open source Lots of people use it
- danabramov 13y agoI'm not sure any of this would have happened without Miguel. Mono really gave .NET a second life when MS dropped the ball. It's also somehow satisfying to witness Xamarin's success and further opening of .NET after all the bashing and hating Mono received from the free software community.
- sharpneli 13y agoTo be honest Mono was a rather uncertain platform due to patent issues and the Oracle vs Google lawsuit. Now that MS has released the stuff under Apache license things have really changed.
- giulianob 13y agoWhat's the likelihood the .NET VM is open sourced as well? I use Mono right now to run my apps on Linux but it would be great to use the official implementation since Mono has subtle differences.
- sixbrx 13y agoThat's the main thing I would be interested in also, but I'm thinking that's one thing that we WILL NOT see. That could seriously undercut the need to buy Windows servers.
- giulianob 13y agoThere's a trade off though. If C# only runs on Windows then a lot of developers who run Linux will never consider C# as an option. If it does run on Linux, then those developers might end up purchasing Visual Studio in order to develop C#. A lot of developers who previously used C# are also leaving the tech for others like Ruby since they aren't tied to Windows.
- pistle 13y ago"Devices & services" Azure is your servers and the .net + C# tooling story from dev to deploy makes the question of selling Windows servers in a VM world moot. Many of the moves coming out of this Build seem to point to a world where it's going to be cheaper and easier to pay for all the MS services and tooling than to try to cobble it together with other people and platforms. We're looking at a lowered on-ramp to .net apps that run more smoothly than java+linux+every-support-tool-bit (dev-wise) across devices (and things). It's compelling. Everything from dev to deployment and ops is getting touched at this conf. This shows where MS's strengths can present differentiation. Their profit source is, and has been, building/selling tools and platforms for others to run businesses. When the thing people hate becomes more like what they aspire to have/be, the tension is palpable. Google is about the only other player nearly capable. But Google's mission has far less to do with selling shovels vs. harvesting and monetizing. Apple is just not in this space. If anything, they sure feel like a device-only company in this conversation. WWDC is about the garden. Build is handing out spades, shovels, and, now, dirt. Xamarin's Evolve, last year, felt a bit like all this does. The are big things happening. If nothing else, at least it feels like change, if not progress for devs and consumers.
- deleted 13y ago[deleted]