David Arno

Results 87 comments of David Arno

@john-h-k, > `enum struct` could conflict with value type discriminated unions If we view closed enums as just another type of DU (where the cases are all parameterless) then there...

Downvoting this as per my comment for [Roslyn #13921](https://github.com/dotnet/roslyn/issues/13921#issuecomment-259682066). For a struct, `S`, if `default(S)` and `new S()` leads to different values, then this feature has no real benefit and...

@HaloFour, Your devil's advocate is a good question. To my mind, the answer is "and that is exactly what's wrong with reference types". It is the driver behind non-nullable reference...

@jnm2, Let's say I have a type that holds information on a car gearbox, including the number of gear stick positions and the gearing ratios and there will always be...

@HaloFour, Currently, `New S()` and `default(S)` do the same thing in all .NET languages, due to the [optimization introduced in Activator.CreateInstance](https://github.com/dotnet/coreclr/issues/6843). That comes about because the dominant .NET languages didn't...

@Joe4evr, Yes, I did mean `default(C)`. Thanks for the correction. Like with this feature, only providing compile-time checks would make it a leaky feature, prone to bugs. So yes, I'd...

@czmirek, > The "hidden internals" of my services would just stay hidden in its internal namespace. Genuine question: what purpose does that "hidden internals" have within these services? The reason...

```cs baz: "", //Extra comma here, it's not hurting anyone! ``` It's hurting readability, simply to make the lives of lazy developers easier. It's bad enough that C# already supports...

@zippec, > > It's hurting readability > How? Whats so confusing about it? I refer you to [my answer to a near identical question from a year ago](https://github.com/dotnet/roslyn/issues/8818#issuecomment-200329241): ----- >...

As it stands, this feature is extremely worrying as it will warn that silent breaking changes have been introduced to the language, but only if you do the right combination...