Wednesday, January 30, 2008 8:39 PM
podwysocki
C# vNext Revisited
I often rethink or have additions to my posts. This topic of what's coming in
C# vNext is definitely one of them. I'm always looking for ways to push the envelope to see what I can get from the language. I have to credit such people as Scott Bellware and others to look more outside of the C# bounds and look to such things as Ruby and even F# to really open my eyes to the possibilities of this language. I'd love to see more F# features in the language as they have slowly seeped in and now pretty ubiquitous.
What I like
I enjoyed
Jeremy Miller's post about what he likes about C# 3.0. I'd definitely have to concur with a lot of those things such as his and some of my own:
- Object Initializers
- Lambda Expressions
- Extension Methods
- Anonymous types
What I'm Undecided About
So, what am I eh about? Well, automatic properties is one of them. Not doing much for me just yet, especially for my domain models. Also partial methods have a particular use, but once again, it looks like a large potential for abuse.
Bart De Smet has a pretty good writeup on them though worth checking out
here. If you check out
Wes Dyer's blog, he also has a good example and why you would use them. To me, it looks like Aspect Oriented Programming in a way, but I much prefer using Windsor interception, and hopefully soon the StructureMap interception.
Do We Know Any More?
Charlie Calvert, C# Community Liason, and
Mads Torgersen, C# Program Manager, wrote a post recently about the
future focus of C#. The first topic in this series is about dynamic lookup. What dynamic lookup is, is the ability to distinguish a type at runtime instead of static compile time.
But why is this useful? Well, in order to interact with dynamic runtimes, this is the best way to do it. The idea of using this for COM interop is also pretty interesting. I've done more than my fair share in this lifetime. Many of the things you see on
PInovke.NET are ones that I either put up there or refined quite a bit, especially while using unsafe C#.
With this upcoming, could
Duck Typing
be far behind? After all, it has been proposed at least for VB9,
although dropped. Of course in .NET, it's already supported on the
foreach keyword as noted by
Krzysztof Cwalina
due to the fact you don't need to implement IEnumerable, and only need
GetEnumerator(). But, will it go any further than that like Ruby?
Filed under: C#, F#