C# 2.0 is done
At this point, I believe that there really isn't anything that can be done any more with C# 2.0, I have taken it to the very limits of its expressiveness, and now I hit a wall.
C# 3.0 adds some interesting features, and extension methods, initializers, etc will significantly improve the expressiveness of the language. Even now, I can see the limitations that even C# 3.0 will give us. But on the other hand, I fully expect some interesting developments in taking the capabilities of the language and pushing them forward.
Comments
The real advancements will happen when new features are added to the frameworks as a whole, boiling down to features at the IL layer, like Generics and such added to .Net 2.0.
C# 3.0's new features are, as we all know by now, built on top of v2.0 by and large implemented by the compiler alone.
Rumor has it that the post-3.5 version will again add CLR features, hopefully with a whole new level of support for things as testing and concurrent programming. Fingers crossed.
Oren,
I totally agree on the brick wall, what would you like to see in the C# Language?
@Mike D,
Of the top of my head?
AoP
Method Missing
Syntactic Macros
Allow [Attributes] to accept expression trees.
memebrinfo (like typeof(), but for memebers)
MethodMissing would be extremely useful for things like proxies and DSLs. It would be interesting if ReSharper could help here. When you call a missing method, it currently offers to create the method. It could have a new option - to create something like:
object MethodMissing(string methodName, params object[] args)
{
switch (methodName)
{
}
}
Adding macros to C# is scary. Even extension methods keep me awake at night. I'm usually not in "less features to protect the idiots" camp, but I've worked with C enough to know the nightmares macros can cause.
Although isn't not syntactic, first-class lightweight proxy support in the CLR is my #1 request, because it'll allow AOP. MBRO is just not an effective solution, and while DynamicProxy and similar CIL-generation libraries are great, it'd be nice to have it right in the runtime. (I mean, c'mon, Java's got it, and I'm not used to being envious of Java! :) This is where MethodMissing would be possible -- I really don't want that to exist on all types, but adding that to lightweight proxies would be great.
I haven't had a chance to dig too far into it, but the DLR may offer some relief when it comes to proxy generation.
I don't think we'll ever get a memberof() operator. The lookups are much more complex, because of method signatures and binding flags. The resulting syntax would be pretty ugly. I think this is one of those situations where a method call is a much more natural operation than an operator.
Nate, the problem of memberof() vs. GetMethod() is the relative cost of doing them.
memberof is just load token, GetMethod is a much more expensive scenario.
Ah, I see your point. I guess it's more than just syntactic sugar then. Maybe it could just be an improvement to the compiler, to "inline" singular GetXXX() calls into the resulting metadata token?
Comment preview