Fabulous Adventures In Coding

Eric Lippert's Blog

A Face Made For Email, Part Four

Good heavens, this just keeps on happening to me.

If you're interested in what we're musing about for future versions of C#, check out this video of Anders Hejlsberg, Scott Wiltamuth, Paul Vick, Mads Torgersen, Matt Warren, Jim Hugunin and, off in one corner, me.

Working with this caliber of people every day is a huge part of what makes this the best job ever.

http://channel9.msdn.com/posts/Charles/C-40-Meet-the-Design-Team/

 

Published Monday, July 14, 2008 10:32 AM by Eric Lippert
Filed under: , , ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Tom Kirby-Green said:

Yes, the rest of the dev community is I suspect hugely envious of working in such a team. Must be extremely exciting :-)

July 15, 2008 4:52 AM
 

Michael Russell said:

I've moved almost completely over to C# from VB.NET, but there is one piece of syntactic sugar that I miss from VB...With.

Especially when you are dealing with structures or objects that are nested extremely deeply (see XNA or even some ASP.NET code-behind scenarios), With was a godsend.

I'd love to be able to do something like...

with (a = Some.Deep.Object.Or.Structure.That.Would.Take.Forever.To.Type.Or.Use.Intellisense.For)

{

a.Property = x;

a.Property2 = y;

a.Property3 = z;

a.Property4 = w;

}

Admittedly, the compiler would just expand a out, but even so, that little shortcut it what I miss more than anything.

July 15, 2008 12:41 PM
 

Erik said:

You already have it:

var a = Some.Deep.Object.Or.Structure.That.Would.Take.Forever.To.Type.Or.Use.Intellisense.For;

a.Property = x;

a.Property2 = y;

a.Property3 = z;

a.Property4 = w;

It even takes fewer characters than your suggestion

July 15, 2008 12:44 PM
 

robert said:

I think the ex-VB crowd may be missing something like this:

with varname = Some.Deep.Object.Or.Structure.That.Would.Take.Forever.To.Type.Or.Use.Intellisense.For;

{

   .Property = x;

   .Property2 = y;

   .Property3 = z;

   .Property4 = w;

}

This way a programmer could only change the variable name in one spot.

July 15, 2008 1:05 PM
 

Aaron said:

I'm more worried about something in the Some.Deep.Object.Or.Structure.That.Would.Take.Forever.To.Type.Or.Use.Intellisense.For returning null.

With the move to more immutability method chaining becomes much more attractive except for that pesky null ref exception. You can make null objects but that has downsides in a language that is still largely imperative. You can make a chain-safe extension method for every method, but that seems like a bad idea. I'd like to see something like a new chain-safe opperator .. which would return the default of the method return type if calling on null.

Some..Deep..Object..Or..Structure..That..Would..Take..Forever..To..Type..Or..Use..Intellisense..For

... or something like that.

July 15, 2008 1:27 PM
 

Eric Lippert said:

First off, yes, you already have the ability to make cheap temporary variables, which is all "with" does in VB.

And second, yes, I would love a null-propagating dot operator too. Unfortunately, the obvious candidate is ugly:

Foo.?Bar.?Blah

I like the wavy arrow myself, aka "the nadj operator" in honour of my erstwhile collegue Cyrus.

Foo~>Bar~>Blah

But .. is not bad either.  Regardless, it didn't make the cut for the next version, so the argument is somewhat moot at this time.

July 15, 2008 1:39 PM
 

Matthew L. said:

It's worth pointing out that if all you want is to create a very short-lived temporary variable that has limited scope, you can do it with the following (admittedly odd-looking) construct

{

  // new local nested scope

  var a = Some.Deep.Object.That.Takes.Forever.To.Type().Foo;

  // do stuff in this block...

}

Like I said, it does look a bit strange, but it's a feature of the curly-brace languages going all the way back to C.

July 15, 2008 3:34 PM
 

Richard said:

Mmmm. Watched the video. Not much in the way of upcoming features. Just how Eric likes to code by himself :P.

July 16, 2008 9:59 AM
 

logicalmind said:

Is there any analysis done that talks about the general distribution of programs that are CPU-bound vs IO-bound? It seems there is a lot of talk about parallelizing programs and how important that is. It would seem that this would be particularly beneficial for programs that are CPU-bound, but possibly disadvantageous to programs that are IO-bound. Though I realize a function that does IO would not be pure and unlikely to be parallelized.

In general, I'm wondering about the target market for parallelization. It would seem that it would be the intersection of the set of people who do scientific computing and the set of people who have trouble doing their own threading.

July 16, 2008 10:47 AM
 

Rudif said:

Hi Eric

I have a question unrelated to this topic (but I can't see your email address anywhere, so here it goes) :

It appears that a x64 version of msscript.ocx does not exist.

Why so?

TIA

Rudif

July 22, 2008 8:29 AM
 

daniel said:

"We can finally do in csharp what we have done in jscript for 8 years..."

Nice  ;)

Daniel

July 22, 2008 1:26 PM
 

Jomit said:

Hi Eric,

(late reply)  I really liked this -

"Design Patterns are just the failure of abstraction in the programming languages"

Does it mean we would see more of design patterns coming out of the box in C# 4.0 ?

Jomit

July 31, 2008 7:52 AM

Leave a Comment

(required) 
(optional)
(required) 
Submit

About Eric Lippert

Eric Lippert is a senior developer on the Microsoft C# compiler team. Before that he worked on the framework of Visual Studio Tools For Office. Before that, he worked on the compilers, runtimes and tools for VBScript, JScript, Windows Script Host and other Microsoft Scripting technologies. He lives in Seattle and spends his free time editing books about programming languages, playing the piano, and trying to keep his tiny sailboat upright in Puget Sound.

This Blog

Syndication


© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker