The background is, that it will make the use of COM components much more convient. Today you link your code against the exact version. If the version of your component is not installed on the remote computer your code will fail, even if the interface the installed component has not changed.
Reflection is in its usage for emergencies only and not suited for complex interfaces. Your code will become a huge mess if you try to handle complex objects.
So this is a HUGE break with current C# dogmas..
But wait a minute! Don't all of you, who know what's behind the letters "VB" feel strangely remembered? Something we thought we had burried a long time ago?
The VARIANT strikes back!
And to be honest, coming down the C, C++ path I feared and hated it, whenever sub-average VB programmer colleagues started using it in their code. The Variant or Dynamic liberates developers from spending a minimal time on thinking before start coding. They simply declare some global "Variants" and use them to store whatever comes along. Absolutely impossible to tell whats the content of the variable when you read the code. The absolut horror of everyone who has to maintain or debug this kind of code.
I clearly see the advantages of runtime binding, but I see the immense risks the same time.
Maybe you should pass some sort of qualification exam to get this type enabled.
"Anders Hejlsberg, Chef-Architekt der .Net-Programmiersprache C#, hat im Rahmen der Microsoft Professional Developer Conference (PDC) in Los Angeles neue Sprachfunktionen für C# 4.0 und die darauf folgende Version erstmals vorgestellt.
Die Hauptneuerung in C# 4.0 ist die Erweiterung in Richtung dynamischer Sprachen. Mit dem Schlüsselwort dynamic können C#-Entwickler in Zukunft eine Variable so deklarieren, dass die Bindung erst zur Laufzeit stattfindet." (Heise.de)
1 comment:
Hello nice blog.
Post a Comment