C# Edit & Continue vs. Refactoring

Published 11 March 04 11:08 PM

Sean asks for it, and Andy blogs some of the thinking behind no E&C for C#.

I really like using E&C when writing C++, and I know that VB users find it pretty valuable.  Seems strange that we wouldn't have it for C#, yeah?  When we talk about the different kind of users of VS, the VB users are typically at one end of the spectrum, C++ at the other, and C# somewhere in the middle.  So if E&C is good for the ends, isn't it good for the middle?

Yeah, C# users want E&C.  So why don't we have it?

E&C was on the list at the start of the Whidbey cycle. 

Refactoring was, too, but treated oddly.  Every time we discussed the proposed feature list, we would have to talk about what refactorings really were, and whether they were worthwhile.  Sure, being able to create a function from a bit of code is neat, but it seemed like something users can already do on their own.  Why do they need us?

Then we looked a little more closely at some of the other modern editors our there, and saw users talk about how valuable Refactorings were.  We even saw users choosing to write in Java over C# because of Refactoring support!  Ack!  We also read Fowler & really began to understand the importance of Refactoring.

When we sat down to look at Refactoring and E&C seriously, we realized that both would be very large endevours, and that we couldn't fit both in the same product cycle.  We talked to customers at trade shows & to our customer council, and decided on Refactoring.  We've since discussed it with customers at the PDC & elsewhere.  After we talk a bit, customers usually say “I want E&C, but I agree that you made the right choice with Refactoring“.

I think we made the right choice for Whidbey.  I think having well factored code has more potential to improve my productivity than having E&C.  Using TDD changes the balance even further.

Still, E&C is a great feature.  It's pretty clear that the future of the Visual C# product includes Edit and Continue.  It's just a matter of time.

Comments

# Robert McLaws said on March 11, 2004 11:29 PM:
I was in a developer webcast with a MS team on Monday and they said that C# will have E&C.
# Robert McLaws said on March 11, 2004 11:28 PM:
Clarification: They said C# E&C will be in Whidbey.
# Frans Bouma said on March 12, 2004 1:17 AM:
I find it strange that VB.NET will have refactoring AND E&C and C# hasn't. (not that I see any useful use for E&C, but that's me).

Isn't it also true that E&C support is build into the compilers/CLR for every language to use, so the C# part of VS.NET just has to hook it up?
# João Miranda said on March 12, 2004 4:08 AM:
Refactoring all the way! I've used both, much more E&C (vb background) than refactoring, and I think that the ability to change the structure of your code automatically, bringing life into it, is a unique experience. It makes me feel happy and proud of my code.
# Chango V. said on March 12, 2004 7:09 AM:
Even though E&C often fails in VC++, I still find it greatly useful--I am big on debugging... I would never trade E&C for refactoring support. Refactoring is just convenience, while E&C is a distinct new capability. And, given the lightness of the C# syntax, I find it lame it wasn't implemented. I hope to see it soon.
# Jay Bazuzi [MS] said on March 12, 2004 9:15 AM:
Robert: can you give me details about your source? I'm certainly surprised!

Frans: C#'s refactoring support should be stronger than VB's.

E&C is built into the CLR and debugger, but not into the C# compiler or C# language service. To add it is a pretty big chunk of work.
# Joe Monnin said on March 12, 2004 9:43 AM:
Well, if it's a pretty big chunk of work, then I suggest getting started. E&C makes debugging a LOT easier and faster and certainly increases productivity of developers, which MS claims it what C# is all about.
# RichB said on March 12, 2004 1:29 PM:
> It's pretty clear that the future of the
> Visual C# product includes Edit and
> Continue. It's just a matter of time.

This was the line MS took 2 years ago when E&C was pulled from the .Net betas (yes, the .Net betas had rudimentary E&C support - in fact, the C# E&C support was more advanced than the VB E&C support).

I believed MS 2 years ago that it's just a matter of time. I'm not sure I'm willing again.
# Jay Bazuzi [MS] said on March 12, 2004 1:34 PM:
Have faith, Rich!

You seem annoyed that E&C isn't just around the corner. Do you think that the decision to select Refactoring over E&C was the wrong choice?
# Sean Chase MCSD.NET said on March 12, 2004 4:14 PM:
> Well, if it's a pretty
> big chunk of work, then
> I suggest getting started.
> E&C makes debugging a LOT
> easier and faster and
> certainly increases
> productivity of developers,
> which MS claims it what C# is all about.

I agree 100%.
# Frans Bouma said on March 13, 2004 2:23 AM:
" Robert: can you give me details about your source? I'm certainly surprised! "
TOday posted in microsoft.public.vsnet.general by Ed Kaim:
Subject: Re: Whidbey - Why is refactoring not in VB.NET?
From: "Ed Kaim [MSFT]" <edkaim@online.microsoft.com>
Newsgroups: microsoft.public.vsnet.general

We do appreciate the feedback, but please keep in mind that the early
releases of Whidbey aren't even Betas yet. For example, Edit & Continue will
be available to C# developers, but it just didn't make the PDC build. You'll
see other features make the Beta that weren't in the PDC build as well.

...

Must be some kind of miscommunication :)
# Chris Martin said on April 24, 2004 3:34 AM:
Frans: I'll believe it when I see it.

I'm beginning to feel that the CLR is not so "common" anymore. Which, is totally understandable; given all these new features and the bickering between camps.
# Rolf said on May 2, 2004 2:20 PM:
It is all about money: in VS 2005 VB will have E&C and C# will have refactoring... so everyone will want to buy VS 2007 when VB and C# will have both refactoring and E&C, right?
# jaybaz [MS] said on May 2, 2004 3:01 PM:
Rolf: how do we sell VS 2005 to C#-only users, who aren't interested in VB E&C?

Please reply soon so I can inform marketing of their new strategy.
# Rolf said on May 3, 2004 1:57 AM:
Let me explain a little better:
- You are giving C# refactoring, but not E&C (so that when in 2007 C# gets E&C they will want to buy it)
- You are giving VB E&C, but not advanced refactoring (so that when in 2007 VB gets it they will want to buy it)

This is not about selling VS 2005, but about VS 2007!
# cwillis said on May 16, 2004 6:57 AM:
E&C will NOT work under ASP.NET for any language for VS 2005! So for many (most?) developers, the whole discussion is pointless until they complete that task in VS 200X.
# Adam said on May 26, 2004 11:03 AM:
I'm deeply dissapointed by the lack of E&C in C#. MS were once well ahead of the curve when it came to development IDEs but with VS.NET it's been a bit of a let down (many missing features, yearly releases, no bug files, etc.)
# jaybaz [MS] said on May 26, 2004 11:45 AM:
Adam: I'd feel a lot better if we released every year! VS 2002 took 4 years, and VS 2005 is ~2 years.

While there are some areas that our competition outdoes us (Eclipse's extensibility, for example), I still believe that the whole VS packages is a big win over the alternatives.

If I was going to start a small software house on a new project today, I would build it on C# without a doubt.
# Marc said on June 16, 2004 12:37 PM:
Isn't it time to drop VB.Net and put it's best features into C# ???
# jaybaz [MS] said on June 16, 2004 5:42 PM:
Does that mean that C# would have to support VB's 'with' and 'My'?
# BillT said on June 22, 2004 5:08 AM:
"Does that mean that C# would have to support VB's 'with' and 'My'?"

Yes. Sure. Or you could drop the features from VB.

Though Microsoft is treating it as a language feature, "My" does not appear to be one at all. It seems to be a thin wrapper on the .NET Framework, and therefore ought to be an extension to the Framework for any/every language to use. Perhaps it ought to really be an application block? I've got to admit, I'm totally puzzled how such a thing came to be a language feature.

I work a lot in BOTH languages, and it's a bit irritating to have major language and IDE features change/disappear just because I switch to the other syntax.

I'd like VB.NET and C# to be feature-identical (not syntax-identical). Why can we not have one .NET system, with the language syntaxes just being views into the same system? I would like conversion from one language to the other to involve only syntax, and not involve re-design at any level.

All this feature leap-frogging between the languages just seems to encourage language-bigotry.
# jaybaz [MS] said on June 22, 2004 3:16 PM:
Is it still language bigotry when you know your language is better? (<evil grin>)

Seriously, though. Cyrus was saying to me, and I agree, that the "My" feature shouldn't be a language feature. It would be wise of Microsoft to build a deep, rich, powerful, object oriented .Net Framework, and then wrap it with a simple, easy My programming model.

I still don't want 'with' in C#, though.
New Comments to this post are disabled

This Blog

Syndication

Page view tracker