Dynamics in .NET 4.0

  • Thread starter Thread starter Nully Girl
  • Start date Start date
Nully Girl used his keyboard to write :
I dont see why dynamics in .NET 4.0 is "a big thing". I dont see why this is
a great step forward. I which cases is it good to use dynamics?
Maybe someone can help me to understand?

http://www.hd720i.com/Future-of-CSharp-vs-future-of-VB-274987.aspx
http://www.hd720i.com/Visual-Basic-is-Dead-267983.aspx

Thanks for all your help and time.

As I understand it, you shouldn't use it to connect to classes within
your project. For that, the "old fashioned way" is best.
The "dynamic" works best when you want to execute code that is not
available at compile-time, such as COM objects or javascript routines
(from within a Silverlight application). *Then* you would have a much
easier syntax due to late-binding, then now, where you need to use
various "tricks" to make it work.

Hans Kesting
 
I dont see why dynamics in .NET 4.0 is "a big thing". I dont see why
this is a great step forward. I which cases is it good to use
dynamics? Maybe someone can help me to understand?


Dynamics allow you to more loosely couple your dependencies, which
allows for greater flexibility. I agree with Hans, however, that
dynamics will be most beneficial with unmanaged resources, but this may
change as I play with them. The other reason for them is to reduce
complexity, as you no longer have to write tedious reflecting code.

I am sure they will end up being a new hammer, however, and wrongly
used. But then I get paid to fix that type of code, so I am not that
upset. ;-)

I see this as one more tool that expands your ability to get things done
without writing a huge amount of code. It is not a one-size fits all
improvement, however, and should be used wisely.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Back
Top