Keyword 'dynamic' of C#4

Unknown W. Brackets unknown at simplemachines.org
Mon Apr 27 23:55:23 PDT 2009


I read until I hit this:

    4.     if (<Main>o__SiteContainer0.<>p__Site1 == null)

And I was suddenly hit with a huge feeling of "I'm glad D doesn't look 
like this."  Seriously, I hope this is some sort of decompiled syntax 
and not actually valid.

I wonder what the overhead times were.  He should've timed them both and 
listed them separately.  For example, is DynamicMethod a complete win, 
or is the dynamic keyword cheaper as far as base cost?

This reminds me of the opDotExp discussion.  I can see that caching the 
cost could potentially be beneficial, as shown here.  That's the main 
offshoot I get from it.

-[Unknown]


bearophile wrote:
> A pair of short posts that show the "dynamic" keyword of C#4:
> 
> http://www.codethinked.com/post/2008/10/28/C-40-New-Features-Part-1-dynamic-keyword.aspx
> 
> http://www.codethinked.com/post/2008/10/28/C-40-New-Features-Part-11-dynamic-keyword-second-look.aspx
> 
> Bye,
> bearophile



More information about the Digitalmars-d mailing list