I read recently that the C# and CLI standards define different ways to handle value types and constructors.
According to the CLI specification value types can't have parameterless constructors, whereas in the C# specification value types have a default parameterless constructor. If, according to the CLI specification, you need to create a value without specifying any parameters, there's a special instruction to do that with.
So my questions are
- why would the C# designers intentionally deviate from the CLI standard - what benefit was there to this, and why doesn't the CLI allow this functionality?
- in my limited experience, any time I find myself using a 'special instruction' to allow for functionality that wasn't initially intended, it's usually a bit of a hack. How is this different?