1/ Edit and continue was a beloved feature of VB6 and was a priority for making migration onto .NET easy for RAD developers. EnC is magical when it works correctly. For web developers that are used to hot reloading, it enables that type of rapid development, but maintains state.
2/ Unfortunately, it is an extremely difficult feature to implement in a JIT'ed world as we discovered that with .NET 1.0. We actually had a version of EnC in the early releases of VS 2002.
3/ I'm fairly sure it persisted all the way up to Beta 1, though the history of when we removed it is a little hazy. The initial implementation wasn't coalescing. There were a huge number of bugs, it performed poorly, and it often corrupted the debuggee.
4/ In short, EnC was often Edit'n'Crash or Edit'n'Corrupt. Although we knew EnC was extremely compelling, we also knew we wouldn't get it right without a more time and a redesign. So the difficult decision was made to cut it.
5/ This was one of several features that VB6 offered that VB .NET (and C#) lacked with VS 2002/2003. I'll talk about our approach to adding many of those features back and enhancing them in VS 2005 w/ .NET 2, but for this thread, let's talk about EnC specifically.
6/ When we started .NET 2.0/VS 2005 work, EnC was part of a RAD pillar that the division was aligned behind. We didn't want to end up with the same late-breaking issues we had in .NET 1.0, so we started the work very early (in 2002/2003 we were already working on it).
7/ We also made scoping decisions very early, the two largest being that it would not support ASP .NET and that we were focused on VB .NET.
8/ The CLR would, of course, implement EnC so any managed language could take advantage of it, but in terms of the edits supported, IL constructs & idioms that were the focus, etc. that was all for VB. For C#, we were focused on implementing generics.
9/ I'll talk about that separately as generics was almost cut several times from .NET 2.0 and it was only through the heroic efforts of folks like Andrew Kennedy and @dsymetweets that it happened. There are many interesting stories for EnC, but I'll tell just one for now.
10/ As I said, VB was the focus for EnC in VS 2002 and we didn't plan to enable it for C#. It wasn't long before we had a lot of feedback from C# developers that they didn't understand why it wouldn't be enabled, and it was, for many of them, equally as important as generics.
11/ At PDC 2003 we talked about generics for C# and EnC support for VB, and it was the overwhelming amount of feedback we received from that conference, as well as the MVP program, that ultimately convinced us to redouble our efforts on C# EnC.
12/ Originally, we worked on a plan to enable it early in VS 2008 (Orcas). However, with a series of scoping decisions, we believed we could finish it before VS 2005 Beta 1 (though after our last coding milestone) if given the green light. EnC was a mammoth multi-team effort.
13/ It required work in the CLR, the language services, the project system, the compiler, and the debugger. Suffice it to say, adding a ton of work to all of those teams late in the cycle was a risky and initially unpopular option.
14/ @dougam, the dev manager for C# at the time, was instrumental in pushing this forward and believing that the team could pull it off. I remember one meeting distinctly. We needed to convince the CLR team that this was the right call, despite the lateness of the request.
15/ @jlzander was the decision maker for the CLR at the time (either the DM or the PUM I cannot remember), but either way, I put together a presentation with a focus on customer need, competition, and risks/work.
16/ The title was originally 'EnC for C#', but when we got to the conf room, we had to wait outside for the previous meeting to end.
17/ Jason and I had a brief chat, and I was suggesting that one of the huge benefits of moving forward would be a higher quality VB .NET EnC because we'd get additional validation of the CLR APIs.
18/ Jason suggested that maybe the presentation should be called 'the best damn VB test case period.' So, right before the meeting started when we got into the room, I changed the title - and ultimately, we decided to move forward :-)

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Anson Horton

Anson Horton Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @AnsonHorton

31 Dec 20
1/ In early 2004 we were heads down executing on Edit and Continue across a large contingent of teams. There had been several iterations of scoping, redesigns, and customer feedback.
2/ We had a weekly meeting every Thursday morning when representatives from each of the teams would get together and review progress. It was fairly heavy weight, but there were so many teams involved that it was necessary to have a regular sync.
3/ Regardless, E&C was coalescing, but teams were stretched thin working diligently to enable scenarios, improve performance, fix bugs, etc. It had been a month or so since we decided to add support for C# to the matrix as well, so folks were a bit stressed.
Read 19 tweets
29 Dec 20
1/ @werat asked about whether the debugger was using the C# compiler or language service in VS 2002. It was not. The debugger has a component called an ‘expression evaluator’ that is provided per language and is responsible for parsing and evaluating expressions when stopped at a
2/ breakpoint. For example, if you type into the immediate window, hover over a variable, type into the watch window, etc. the expression evaluator is involved. The debugger and the language service are actually deeply integrated in a number of scenarios in VS, which may
3/ initially seem surprising. I may talk about more of these scenarios in the future, but to give a flavor, when you set a breakpoint at design time the language service is involved, when you are using Edit and Continue the LS is involved, the range of what is being evaluated
Read 14 tweets
28 Dec 20
1/ I haven't mentioned much about C# integration into Visual Studio yet, but at the same time we were working on creating a new language, a new runtime, and a new framework we also decided to take disparate shells (MSDEV, devenv, VB6) and combine them. This was… a lot.
2/ As you might expect, taking on so much at the same time meant a very long development cycle. For those folks using VS6 it was a long wait for VS7 (‘98 to ’02). Regardless, we wanted to continue to provide a compelling LOB (line of business) client app framework while also
3/ enabling web apps (via ASP.NET, web forms/services, etc.). The client app framework manifested as Windows Forms and was the next iteration of a RAD app creation environment. The Windows Forms designer is extremely rich and intended to make developing UI-rich
Read 15 tweets
27 Dec 20
1/ An interesting bit of history for .NET and C# is that there used to be a public System.Variant type. It was actually a keyword in C# for a while, alongside of object. If you’re unfamiliar with variants, they are a tagged union type.
2/ This means that they can represent many different data types and contain a ‘tag’ (a small enumeration) that defines the type of data they hold. This evolved because COM uses variants heavily, as did VB6 (and many other languages).
3/ In the original iterations of VB.NET, Variant was used for any untyped declaration (e.g. Dim a, b). Variants and System.Object are similar in some ways, and as you might guess, this led to problems.
Read 11 tweets
26 Dec 20
1/ The C# development team, for V1, consisted of 5 individual engineers, a lead, and a couple of PMs. 4 of the engineers worked on implementing the compiler, and the last engineer worked on the Visual Studio integration (e.g., IntelliSense).
2/ The C# compiler was written entirely in C++ as was much of Visual Studio at the time. Everyone on the team wanted to implement the compiler in C#, but as I mentioned previously, expediency was key and when we started, we needed to bootstrap. That was done in C++, so it stuck.
3/ The compiler was largely implemented as a batch compiler. We had a no-release heap, which was extremely efficient for straight-through compilation and totally useless for interactive scenarios. Therefore, the compiler and what we call the language service were implemented
Read 11 tweets
25 Dec 20
1/ It's probably not the first thing you think of, but when we started .NET (COM+) in the late 90s, C# didn't exist yet. We were working on it at the same time as the CLR and the framework. So, you might wonder, what language was being used to generate IL and write the BCL?
2/ The answer is a language that we called SMC that Peter Kukol wrote the compiler for. Peter is a flat out amazing engineer and wrote the core parts of the compiler in just a few days. This unblocked the framework team, allowed vetting the runtime and interpreter, etc.
3/ SMC was a trimmed down C++ variant and the compiler was written in itself (i.e. SMC). It didn't support things like destructors, multiple inheritance, virtual base classes, etc. But, overall it enabled progress that would have otherwise been stalled.
Read 10 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!