Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Language   (RSS)

Updated version of my book coming...

In the spring before C# was first disclosed, I ended up, through a curious juxtaposition of events, writing a book on C# named " A Programmer's Introduction to C# " This probably rates second on the list of "cool things I got to do while I was on the
Posted by ericgu | 7 Comments

What's with those "break" statements?

One comment from my recent post was big enough to handle separately... Thomas wrote : I'll second the break statement. Why is it really necessary? Haven't you guys got enough feedback to acknowledge that wasn't the brightest move? You say it is there
Posted by ericgu | 24 Comments
Filed under: ,

x+=x++;

Luca , who is taking over for me as C# Compiler PM, wrote this post: x+=x++; I heartily agree with him when he says "DO NOT WRITE THAT CODE".
Posted by ericgu | 2 Comments
Filed under: ,

Be a language designer redux...

Thanks for all the responses to the question that I posed. The reason I posed it is that I've been seeing a lot of language requests coming through the MSDN feedback site, which is a good thing, but some of them are pretty obviously impractical, so I
Posted by ericgu | 15 Comments
Filed under: ,

Be a language designer...

I started writing a normal blog post - well, as normal as any blog post of mine ever is - and then I decided to let you do the hard work. So here's the situation. You're part of the C# language design team thinking about the next version of C# (ie the
Posted by ericgu | 53 Comments
Filed under: ,

Conditional Attributes

There's an extension to the conditional concept that shows up in Whidbey. It's not in Beta1 (well, to be more correct, it doesn't really work in beta 1), but it will be functional in beta2. If you put a conditional attribute on an attribute definition,
Posted by ericgu | 7 Comments
Filed under: ,

Conditional Methods

I saw an internal post today about somebody who wanted to get rid of their #if DEBUG statements in their code, because they were ugly. That made me realize that there's a feature that not everybody knows about, known as conditional methods. Consider the
Posted by ericgu | 16 Comments
Filed under: ,

Arrays inside of structures

Sometimes when doing interop, you want to have an array embedded inside of a struct. For example, something like: struct data { int header; int values[10]; } that you either used in a call to interop, or with unsafe code to deal with an existing format
Posted by ericgu | 8 Comments
Filed under: ,

Nested Using Statements

I got a comment on the language feature post, asking about an easier way to write: using (StreamWriter w1 = File.CreateText("W1")) { using (StreamWriter w2 = File.CreateText("W2")) { // code here } } You can do this by writing: using (StreamWriter w1
Posted by ericgu | 19 Comments
Filed under: ,

TechEd Whiteboard with Anders

At TechEd 2004, Anders did a whiteboard talk . Recommended. (From Dan )
Posted by ericgu | 2 Comments
Filed under: ,

using - It's not just for memory management

When we designed the using statement waaaay back in the first version of C#, we decided to call it using because we thought it had other purposes outside of the usual use: using (StreamWriter writer = File.CreateText(”blah.txt”)) { ... } Today
Posted by ericgu | 14 Comments
Filed under: ,

Anders Hejlsberg - Programming data in C# 3.0 #

Dan pointed me to a new video on Channel9 about some of the things we're talking about for C# 3.0
Posted by ericgu | 6 Comments
Filed under: ,

Poser: What is the lifetime of local instances?

A reader wote me to ask a question about variable lifetimes. Consider the following code: class Mutex { public Mutex(string name) { hMutex = Kernel32.CreateMutex(null,false,name); Kernel32.WaitForSingleObject(hMutex,0); } ~Mutex() { Kernel32.ReleaseMutex(hMutex);
Posted by ericgu | 2 Comments
Filed under: ,

Why language features die, and language extensibility

Rick Byers wrote (some time ago): Thanks for the awesome post Eric. I'd be interested in hearing more detail about the sorts of things that cause features to be rejected. Is it common to reject a feature that you think would be valuable only because of
Posted by ericgu | 5 Comments
Filed under: ,

Future language features & scenarios

We're starting to think about the release after Whidbey in the C# compiler team. I know that it seems strange that we have just shipped the Whidbey beta, and we're already talking about what comes next, but we're fairly close to being “shut down”
Posted by ericgu | 114 Comments
Filed under: ,
More Posts Next page »
 
Page view tracker