Wikipedia talks about C# typing discipline:
static, dynamic, strong, safe, nominative, partially inferred
What is typing discipline? What those terms mean and how they are related to the language?
Wikipedia talks about C# typing discipline:
static, dynamic, strong, safe, nominative, partially inferred
What is typing discipline? What those terms mean and how they are related to the language?
The typing discipline on wikipedia refers to the type system used by C# (just try clicking the link, it will lead you to the Type System article).
As for what they mean:
static - The types are determined at compile-time (the compiler wants to know the type before it runs)
dynamic - The types are determined at runtime (in C#, this is facilitated with the dynamic
keyword introduced in C# 4.0)
safe - The language doesn't allow you to violate the type rules that it has. You can't put strings into a list of complex types for instance without a cast defined.
strong - Rather than poorly explain it, have a look at Eric Lippert's article on the topic here
nominative - The name of the type is used to determine type equivalence (what this means is that two types with the same fields but different names are treated as different types)
partially inferred - The compiler can guess the type you are referring to during compile-time (this is the var
keyword in c#, which allows you to not specify the type in your code, although it's still determined at compile-time in a static and strong way)