C# 4.0 dynamic vs std.variant
Jesse Phillips
jessekphillips+D at gmail.com
Tue Jun 29 12:40:19 PDT 2010
I found a simple article on the coming 'dynamic' type for C# 4.0[1]. I didn't think I would find anything interesting about it since D already has std.variant. There were two things of interest.
1) The possibility of mixing dynamic languages in the same code as static (like ASM in D).
2) When a function is called on a dynamic type, the call is checked at run-time to see if the call is valid.
The second should be doable using opDispatch? And it would be checked at compile-time instead of run-time. Wouldn't that be a good addition to std.variant? Then once again C# is only catching up to D :)
1. http://www.hanselman.com/blog/C4AndTheDynamicKeywordWhirlwindTourAroundNET4AndVisualStudio2010Beta1.aspx
More information about the Digitalmars-d
mailing list