views:

641

answers:

1

In his PDC talk, Anders said that the dynamic keyword would dispatch any function calls made to it at run time.

He then went on to say that the "dynamic" keyword is itself staticly typed checked during compile time.

Now if you were to invoke a method that does not exist on a "dynamic" type - would'nt this result in a run time error?

Is it right to call the C# 4.0 language a static type checking language?

Or is it that I just don't get what Andres was talking about in this presentation?

+4  A: 

C# still has static type checking, but it is kinda of funny to say that the static type of a reference is "dynamic". IIRC the actual type for dynamic is object, with a special IL flag to indicate that it is resolved dynamically. Of course if the actual type does not support the given operation an exception is thrown.

Brian Rasmussen