Did you know? DZone has great portals for Python, Cloud, NoSQL, and HTML5!

Gunther recently joined Microsoft in the role of ISV Architect Evangelist. In this role he enables ISVs to efficiently architect, implement and deploy software solutions by fully, and efficiently, leveraging the potential of the Microsoft Development Platform. Before joining Microsoft, Gunther worked as a senior consultant on software architecture and software factories at Siemens Corporate Research in Princeton, NJ. With more than 10 years of experience in software architecture, design, implementation, and deployment of complex enterprise software solutions, Gunther has in-depth experience in the entire Software Development Lifecycle. As a result of his work, he published two books (".NET -- A Complete Development Cycle" and "Practical Software Factories in .NET") as well as numerous articles in magazines. Gunther is also an invited speaker at international conferences and received the Microsoft Most Valuable Professional (MVP) - Solution Architect award in 2005/2006/2007. Visit Gunther's blog at http://blogs.msdn.com/glenz Gunther has posted 13 posts at DZone. View Full User Profile

Language improvements in C# 4

12.17.2008
Email
Views: 6194
  • submit to reddit

Based on the .NET Framework 4.0 we will see new and exciting features. The theme for future C# versions is to incorporate more features based on the industry trends:

  • Dynamic Language Support: In the industry see more and more use of dynamic languages such as Ruby and Python by the developer community. I still believe that static typing provides a very important safety net, but on the other hand some tasks are just done much more efficiently done in dynamic languages. Therefore I am very excited about the fact that C# will incorporate dynamic language features in its next version. C# will provide a dynamic keyword which will mark a property or variable as dynamic at compile time. Nevertheless, at runtime the corresponding static type will be assigned to that entity, see the example code below.image
  • Declarative Programming: In many ways we over specify our programs by using imperative programming techniques. This not only makes it tedious to program software but also makes it hard for the compiler to catch the intentions of the program in order for it to do optimizations (such as parallel execution). With LinQ and functional programming elements included in the C# language  it is possible to declaratively specify the intention of the code which allow the compiler to optimize more intelligently.
  • Concurrent Systems: With the saturation in clock speed improvements of processors and the trend to processors with multiple (many) cores, the paradigm in software development will have to shift from single threaded systems to systems that leverage the power of the hardware provided. In the next version of the .NET Framework and Visual Studio writing such programs should become much easier through:
    • Parallel Extensions for .NET (Parallel LINQ, Task Parallel Library, and Coordination Data Structures)
    • Parallel Pattern Library
    • Concurrency Runtime
    • Tooling for Debugging and Profiling

image

Furthermore the upcoming system of C# will allow for Improved COM compatibility through the optional and named parameters features. The results of these improvements can be seen in the example below.

image

So there are a lot of reasons to take a look at .NET 4.0 to get ready for and leverage the new features provided for your development…….

These are exciting times and programming languages today are not adhering to one paradigm, such as functional or object oriented programming, anymore but the new paradigm is multi-paradigm.

Published at DZone with permission of its author, Gunther Lenz.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)