Welcome to MSDN Blogs Sign in | Join | Help

C# 3.0? You haven't even shipped 2.0 yet?

One of my readers commented (and I'm paraphrasing here):

Why are you asking me about features for the next version of C#, when the 2.0 version hasn't even shipped yet?

A fair question.

One of the problems that we have in the tools division is the long lead time between the time when we're done with a product and the time that it's actually available to our customers. Delta a few small items and some bugfixes, the C# compiler is essentially done for Whidbey, so that's why we're thinking about the next version.

We've always had this offset, but because we're attempting to expose our designs much earlier than we have in past, it may look strange from the outside. As involving customers early on in design becomes more common, this should be less weird.

Hope that explains things a little better.

Published Friday, July 30, 2004 3:27 PM by ericgu

Comments

Saturday, July 31, 2004 10:47 AM by S N

# re: C# 3.0? You haven't even shipped 2.0 yet?

Would you consider letting people write ILASM in a C# program within unsafe context similar to coiding ASM in C & C++?

Saturday, July 31, 2004 12:16 PM by jaybaz [MS]

# re: C# 3.0? You haven't even shipped 2.0 yet?

The long lead time is almost exclusively in the compiler. The rest of the division is still working hard to ship Whidbey.

The lead time on the C# Language is even longer than the C# compiler, which is longer than just about everything else.
Saturday, July 31, 2004 2:00 PM by damien morton

# re: C# 3.0? You haven't even shipped 2.0 yet?

I notice that Anders was using the following construct extensively in a recent video:

var x = new Dictionary<Foo,Bar>();

which infers a Dictionary<Foo,Bar> type for x.

Will we see this construct in Whidbey?
Sunday, August 01, 2004 8:06 PM by Eric

# re: C# 3.0? You haven't even shipped 2.0 yet?

Perhaps.
Sunday, August 01, 2004 8:28 PM by damien morton

# re: C# 3.0? You haven't even shipped 2.0 yet?

I hope so. There were a number of fantastic new ideas Anders mentioned in his talk.

In particular mixins ard interface default methods are great!
Monday, August 02, 2004 7:59 AM by David A. Mellis

# re: C# 3.0? You haven't even shipped 2.0 yet?

Eric: how can we make suggestion for C# 3.0 if you won't tell us what's in 2.0?
Monday, August 02, 2004 8:58 AM by Eric

# re: C# 3.0? You haven't even shipped 2.0 yet?

David,

The spec for V2.0 is publicly available at http://msdn.microsoft.com/vcsharp/language
Monday, August 02, 2004 3:10 PM by Steve Jackson

# re: C# 3.0? You haven't even shipped 2.0 yet?

I'd be shocked if this wasn't mentioned before, but why not include a little bit of regex syntax sugar in C#. With the string object on the left hand, the compiler could prebuild a regex object from string and perform a Regex.Match operation using the ~= operator, ala....

if ( myString ~= "\d" )
.....

Of course, if I had that, I'd want regex support in switch statements too, but...
Monday, August 02, 2004 3:16 PM by David A. Mellis

# re: C# 3.0? You haven't even shipped 2.0 yet?

When you were asked if we'll see the

var x = new Dictionary<Foo,Bar>();

in Whidbey, you said, "Perhaps." I took that to mean that you knew the answer and couldn't reveal it. Did you instead mean that the spec isn't final yet? In either case, it's hard to comment on 3.0 before knowing what will be in 2.0. Not impossible, of course, and still useful, but still difficult.
Monday, August 02, 2004 3:43 PM by Eric Gunnerson

# re: C# 3.0? You haven't even shipped 2.0 yet?

David,

Sorry for my short comment earlier.

When you say that you don't know what's in V2.0, I don't understand what you're saying. Are you saying that without using it it's hard to give an opinion, or something else.

On the "perhaps" front, it's hard to be more precise than that. We're a *long* ways from having anything definite for V3.0, so at this point "perhaps" really means:

"This is something we're considering doing, but we haven't completed detailed language design discussions about it, nor do we know enough about the other features to know where it falls in the priority list."

Or something like that. Does that make more sense?
Monday, August 02, 2004 10:13 PM by Norlan Mumar

# C# 3.0

could we have a delete operator in C#, that will be use for deterministic disposal of the object, instead of using the "using" construct. e.g.

<code>
-----------------------------------------------
//assuming class x implements IDisposable
X objX = new X();
....
delete objX;
-----------------------------------------------
instead of this:

using( X objX = new X() ){
....
}

</code>
Tuesday, August 03, 2004 9:16 AM by Ken

# re: C# 3.0? You haven't even shipped 2.0 yet?

Norlan - your "delete" code is not exception safe, while your using code is.

This is a big reason why I rarely use delete in C++ code - storing the pointers in deterministic lifetime wrappers takes the burden of exception handling out of my pointer management.
Tuesday, August 03, 2004 3:53 PM by David A. Mellis

# re: C# 3.0? You haven't even shipped 2.0 yet?

Damien asked if we'd see the "var" construct in Whidbey. I took your perhaps to mean that the Whidbey specification wasn't finished, and that "var" might still appear. Thus my comment. Reading your reply, however, it seems that you simply read Damien's comment as referring to 3.0, not Whidbey. Is that true?

If so, and such a major change will not make it into Whidbey, then please excuse my comment. The publicly available documentation and library is more than enough to explore the new features of C# 2.0 and begin to make suggestions for 3.0.
Tuesday, August 03, 2004 4:01 PM by Eric

# re: C# 3.0? You haven't even shipped 2.0 yet?

That's much clearer.

Yes, we are virtually locked down on 2.0 features, and there's no chance that something like "var" will show up in that release.

It may show up in future releases. Sorry for the confusion.
Tuesday, August 03, 2004 4:05 PM by damien morton

# re: C# 3.0? You haven't even shipped 2.0 yet?

It was just a question. Anders' used of the "var" construct was probably impromptu (and likely casued by the laboriousness of handwriting type declaration and initialization statements), and based on his experiences with 3.0 planning.

Im sure that in the time before Whidbey is released, there might be opportunities to make minor changes or improvements, but that it hasnt been decided which changes or features to throw resources at.

My question wasnt so much a question as a request or vote. Probably not worth getting worked up over, though.
Thursday, August 05, 2004 11:00 PM by Matthew W. Jackson

# Solution you can use now...

Here's the solution to the double-typing problem in C# that I've been using for a bit now. This is the third or so revision and I'm mostly happy with it.

The $params$ part of the expansion may seem weird at first, but it's a compromise that allows two things:
1) The default constructor will be used if you don't change it.
2) Intellisense will pop up when you do change it.

I would prefer for VisualStudio to ask for the variable name first, but I haven't determined a way to do this yet. Maybe functions in the expansion instead of literals? Is there a good guide on writing these things?

<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippet Format="1.0.0">
<Header>
<Title>Variable declaration/construction</Title>
<Shortcut>var</Shortcut>
<Description>Expansion snippet for variable declaration and construction</Description>
<Author>Matthew W. Jackson</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
<SnippetType>SurroundsWith</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>name</ID>
<ToolTip>Variable name</ToolTip>
<Default>var</Default>
</Literal>
<Literal>
<ID>type</ID>
<ToolTip>Type</ToolTip>
<Default>object</Default>
</Literal>
<Literal>
<ID>params</ID>
<ToolTip>Constructor parameters</ToolTip>
<Default>(</Default>
</Literal>
</Declarations>
<Code Language="csharp" Format="CData"><![CDATA[$type$ $name$ = new $type$$params$);]]></Code>
</Snippet>
</CodeSnippet>
Friday, August 06, 2004 12:13 AM by Matthew W. Jackson

# re: C# 3.0? You haven't even shipped 2.0 yet?

Errata:

I forgot to remove this line from my snippet expansion:

<SnippetType>SurroundsWith</SnippetType>

When I wrote this snippet, I didn't fully understand the meaning of SnippetType, but I've since learned its purpose.
Thursday, August 12, 2004 2:31 AM by Julian Willmott

# Suggestion for C# 3.0...

Can we have property scoped variables in C# 3.0?

This would force all getting/setting of the value to go through the property.

Syntax Suggestion:

class MyClass
{
public string MyProperty
{
string _myVariable;
get { return _myVariable; }
set { _myVariable = value; }
}
void MyMethod()
{
_myVariable = "Hello"; //Compile Error
MyProperty = "Hello"; //OK
}
}

This would be particularly useful for when you want to always raise an event when the property value changes.

Tuesday, August 24, 2004 1:41 AM by Jason Brown

# re: C# 3.0? You haven't even shipped 2.0 yet?

How about pure function support? I've never been able to successfully implement something close to lambda-binding that you get in say SML (Standard Meta Language). I know that there is an SML .Net from your lab in Cambridge UK, but I think having a lamba binding equivalent in C# would be a leap in language design. This way we can pass functions that have bindable scop, oh the thought.....

Saturday, December 18, 2004 10:52 AM by MBA

# MBA

Helpful For MBA Fans.
New Comments to this post are disabled
 
Page view tracker