Cottleston Pie

Fernando Felman’s thoughts on software development

  • Categories Navigation

  • Topics

  • Archives

  • Advertisements

Archive for the ‘C#’ Category

C# version 4

Posted by Fernando Felman on December 4, 2008

Take a look at this early insight on what’s coming in C# 4.

I really like all of it, but that’s easy for me as I’m happy to see any extension added to the language. Well, as long as it keep the same "feel" of what we’re used to see in C# that it.

So, what we could be seeing from the C# team? A lot!

  • Dynamic Language Runtime (DLR) to enable dynamic lookup (runtime invocation discovery & binding). This feature will enable duck-typing, integration with dynamic languages and a much better COM integration experience. It’s planned to be delivered with an API to support custom bindings which can greatly improve injection scenarios such as IoC and Mockups.
  • Variance and Generalized Constraints support for Generics to enable better inheritance options for generics. The nice thing here is the syntax that is dead simple and self-explanatory.
  • Optional and named arguments. Nice syntax candy.
  • Better COM integration. Many COM-based syntax candies can be delivered based on these new stuff. COM instances can be mapped to dynamic objects, thus enabling support to default methods and properties, and with optional arguments we can have real simple COM integration code. and here’s a good news to all of you Office automation developers – ref will not be required anymore!

While on this topic, it’s also worth noticing another announcement from InfoQ around C# to support code contracts to enable declarative constraints for types. Think of the Validation Application Block from the source code itself.


Posted in C#, Future | Leave a Comment »