Neal Gafter
Neal Gafter
We are hoping to have records defined without a separate keyword. Parameters of the primary constructor become public readonly properties of the class by default. See https://github.com/dotnet/csharplang/blob/master/proposals/records.md#record-struct-example for an example.
@gulshan Can you please back up that assertion with an example? I don't see how using an object initializer instead of a constructor enables anything.
@Richiban In the primary constructor feature, you could have only used the primary constructor parameter in field and property initializers; parameters are not captured to a field automatically. You could...
@Richiban No, if a property is explicitly written into the body by the programmer, as in my example, then the compiler does not produce one. That is described in the...
@Richiban We no longer restrict record types to be sealed or abstract. The following [design note in the spec](https://raw.githubusercontent.com/dotnet/csharplang/master/proposals/records.md) describes how equality is likely to work: > **Design notes**: Because...
We *could* make a special rule saying that in an abstract class the compiler-generated constructor is `protected` instead of `public`. But there would be literally no point in making that...
This would be something like ``` c# interface IAsyncEnumerable { IAsyncEnumerator GetEnumerator(); } interface IAsyncEnumerator: IAsyncDisposable { Task MoveNextAsync(); T Current { get; } } ``` With the following elements...
> That leaves us where we are today: Attributes are not copied or moved to the hidden "real" Main method. @gafter: do you have any suggestions on where these details...
> to be clear, this is not about "extension patterns", right? I don't care what they are called. > or this would be the only way to have a user-defined...
@Thaina http://gafter.blogspot.com/2017/06/making-new-language-features-stand-out.html People will not be stuck with C# 7 and earlier in their brains forever. They will learn the new features and integrate them into their understanding of the...