"This means that folks like the Mono team could look at this Reference Source and not have to gouge their eyes out afterwards. "
Very reassuring as well.
One of the first things I had to do for my last job was subclass Window to support custom borders (Zune Player/VS2012/Office 2013 style.) I took a peek at the reference source, and I couldn't help but think the missing bits were the juicy bits, workarounds for window manager bugs or insights into how it does things.
If you see a munged file, report it with the feedback link. Sometimes regex's go bad and we can fix them.
I apologise if this isn't the case, and I'll definitely use the feedback link if this issue comes up again.
For example, you could use the "compiler as a service" to create a semantic model from source code and then query it for "all classes that contain a public method that accept an int and return a bool". This might sound trivial, but using a tool like Roslyn to do this is much easier than writing a parser that handles a language and then doing the same thing.
1. It's nice to have the same view of the code that your compiler has. This matters less for C# than it would for C++, but it's nice to know you handle the edge cases in a consistent fashion.
2. Invalid code. Since Rosalyn is designed for being used in VS while you're in the middle of typing, it has advanced functionality for handling incomplete or erroneous code. If building your own parser for valid code is hard, building a parser that also gracefully handles half-finished lines is an order of magnitude harder. And having it handle half-lines in a fashion consistent with how VS handles it is another order of magnitude.
This also means that the general bar for building code analysis tools has been lowered by quite a bit
EDIT: On second thought, Mads said primary contructors are being considered, and I think that would make implicitly-typed fields possible.
They seem very much on top of their game, and their response has been that lots of these features would probably introduce problems with existing base-class libraries and classes. If they were to introduce those features, they would have to do it at release 1, not 10 years later. They agreed it would have made the platform better, but now it's too late.
As for the "deep architectural" changes required, Roslyn is indeed that change. But the team was very clear on wanting to deliver in stages. 1: Deliver the new compiler and then 2: later when it all has proven to work well, then start using this new architecture to deliver new features.
I don't think compiler architecture is seriously stopping features in their tracks -- there's only a cost/benefit analysis. 'MichaelGG's suggestion on inferred members, for example, has implications on the contracts of types and usability/user interaction with the language, so it's not just a question of if we can do it, but if we want to do it.
If a traditional compiler has an API of "source files and configuration flags in, object files out", the Roslyn API is completely different. Roslyn is about designing and providing a semantic API over C# language analysis and compiler services.
Some of the features of the reference source website enabled by Roslyn's semantic understanding of symbols (assemblies, namespaces, types, members) are color-coding, search, browse, jump-to-definition, and deep-linking.
For example, I can deep-link to part of WPF like so:
I can see which assemblies depend on it, which assemblies it depends on, and browse the source of the assembly in a tree view either by source file or by namespace -> type -> member name.
SELECT MyClass1.Method1(ColumnA, Math.Round(ColumnB))
So in otherwords, you can extend any of your little languages so that you can mix C# in it. Considering C# supports tons of functional features, Linq, anonymous types, dynamic types etc this can really beef up host language.
E.g. If you're writing a BASIC interpreter:
10 PRINT "Hello World"
20 CSHARP "Console.WriteLine(42);"
30 GOTO 10
However what Roslyn does support is "transform this snippet for me", which is useful if you know the boundary between your code and code it cares about.
1. Microsoft.Build.Tasks (the bit that has been screwing with me all day) contains static sealed classes with nothing in them. I thought this was a reference source rather than a source of empty interfaces and empty implementations? Still having to resort to reflector to find out what is going on. Problem not solved.
2. So, ReaderWriterLockSlim has a bug in it with respect to low CPU allocation in virtual machines where 20 concurrent threads accessing a locked object at the point of write cause the spin lock in the implementation to thrash and up blows a race condition taking out the process. I can actually see where the bug is now. Where do I submit this bug, bear in mind I can actually recreate it? I phoned up our MSDN rep - they said raise it on Connect. There isn't a place for it on Connect. Phone up generic paid support, three levels of technical staff bounce me around for a week. as a PAID UP GOLD PARTNER, this sucks. If you open your source, track bugs openly too. Problem not solved.
3. This is only the core framework. We really need the entire lot including all dependencies and external tools. There aren't any symbols on symbol server or this for VSTO or Sharepoint for example? What we do get is another black box somewhere in the system that we can't inspect or poke inside even though it's a wrapper for a COM API or a product API. Problem not solved.
4. Does Rosyln/next MSBuild support parallel compilation? Being tied to a single compilation core on a VS2013 build means we have 8 core Xeons sitting there doing nothing. Our only hope of speeding this up is cranking up to high end i7 to get one core with crazy integer performance. 20 minute sit down compiles are too much these days. http://xkcd.com/303/
I understand this is progress and Roslyn is cool and all that, but what does it deliver for every day users of the CLR/Framework? It doesn't really make our day much easier. In fact stuff that really improves developers' lives has stopped appearing completely and instead we get tedious reengineering projects and new features designed only to lock us further into the system (VS online+sign in anyone?)
Also how does this compare to say LLVM/Clang?
I imagine this semantic compilation stuff will make some static analysis stuff easier and stamp on the toes of Coverity etc but that's about it.
Edit: sorry if this is purely a content-free rant and unpopular but after 12 years of this crap from Microsoft, I want to see new wheels, not the same ones reinvented and remarketed. Developers are lapping up this crap constantly as if it's as good as it gets. We need some REAL CHANGE towards openness and consistency and to ask the community and users what they want rather than telling us what we need.
I find it funny (not really) that somehow this floats up as the top comment when most developers have no clue what he is talking about but since this is HN and someone is saying how bad Microsoft is then lets upvote. Microsoft killed my pappy and all (ht to shanselman) so I must do everything I can to make sure no one else dares like them.
Note that I find Roslyn an interesting project and it's always a WTF for me whenever I touch .NET that I'm not able to easily view/step through the source code of everything I use, including the standard library, so for those suffering, this article is actually good news - and I'm fed up with negative and uninformed opinions on anything interesting, especially on my current platform of choice that's very trendy to bash lately, which I won't name because it would defeat the purpose - because it's much easier to provide uninformed, non-constructive criticism then it is to build stuff, plus we tend to treat our favorites as sports teams with us behaving like cheerleaders, am I right or what?
But for the uninformed reader, such as myself, comments such as yours just add to the noise, I mean WTF?
I suspect part of the grind is that code changes for microsoft requires a litany of testing and release planning and such. Being beholden to a paying userbase ties ones hands in numerous ways (god forbid their patch breaks something else). That said, there is no excuse for sloppy communication.
Because that's what I expect from a "modern" developer's environment in year 2014.
I work in other ecosystems as well and there's just not as much crap to deal with by several orders of magnitude.
.01% is a small number - so you have 3,000-4,000 problems with the CLR and .NET framework.
Sorry to translate literally, but this kind of gross exaggeration and lack of data is what creates the "Microsoft sucks!!" attitude that is based on a 10-year old reality (at best).
To take from another conversation, msbuild is very powerful but it's not very usable at all. So much tribal knowledge and secret handshakes you can't learn unless you have a contact in devdiv.
Beyond that, I've opened 3 incidents with Microsoft in the past and they've been nothing short of amazing. One guy even busted out an assembler and stepped through my code to identify that our issue was actually a deliberately closed accidental exploitation path. Enormously frustrating at the time, but he even provided a workaround for us but, like you say, it took several months.
To be specifically productive though: I feel like Roselyn does provide lots of value to developers in terms of what VS plugins can do. There are infinity re-implementations of the MS Compiler out there in terms of plugins and analysis tools. Would be nice to have everyone at least speaking the same language. I think the other thing this initiative does is put the license out there with permissiveness and clarity. Mono can feel comfortable lifting the concepts and integrating it in to their own without worrying about being sued now. This is all great things that they are making available their compiler as a tool and non-platform limited licensing. But - it's only a step it's not the end-game.
What are things you think really improve developers' lives that microsoft used to build they don't build now?
I'd file the bug here: http://connect.microsoft.com/VisualStudio
(which despite the name is also the right place to report library issues)
For example there was a regression in ClickOnce with download prompting between IE8 and IE9 due ot the download bar throwing away some compatibility settings. Overnight, when IE9 became mandatory in Windows Update, we had 2000 users down. We got all the users to roll back to IE8. It took 6 months for a registry fix to be sent out to us from a 3rd line support executive after being on the phone daily about it. This is still not fixed in IE11. We've rewritten all our ClickOnce launch points to work around the regression. This took one developer 2 months of work. The regression appeared in the RTM IE9, not the previews.
As for that being the correct place, it's obviously not as the issue was raised there, marked private and closed as not reproducible despite test cases being issued. Not a single contact back from Microsoft bar "closing as can't reproduce". Our rep suggested contacting another support team. Even they aren't helpful.
I need a new job, writing C on Unix...
Let's hope the right persons at Microsoft see this thread.
I can no longer find the bug on the dashboard.
Source: http://vimeo.com/84677184 (07:55)
3. Yes, we're adding more libraries.
4. Have you tried using /maxcpucount on MSBuild to enable parallel compilation?
This was supposed to be what clang/llvm has become.
Also, their code explorer is far and away better than trying to spelunk through a Git repository looking for that one file you want to read. So I think it's actually an improvement for when you just want to look at a few files rather than download everything.
Ah. They should want to expose it to the world and take contributions.