With is just building on the anti-pattern where .NET programmers are too lazy to implement constructors.
What? And aren't records just a lazy way to make classes then?
The correct path would have been to require primary constructors for records as the only point of entry for data, declare initializers incompatible with primary constructors, and then just synthesize a method for creating copies - but hey, then you might as well just use Scala.
The keyword is the declaration is `record`. So you would write your record:
record Person(string FirstName, string LastName);
Source: I am one of the language designers on C# :) public data class Person(string FirstName, string LastName);
It seems https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csh... is saying what you wrote above though.Seems my previous comment was based on outdated/wrong information, I'm sorry and thanks for clarifying :)
Edit: Seems the post I wrote was published 20th May (probably written before) and that was the same date someone said the same thing as my comment here in the discussion about the "records" feature https://github.com/dotnet/csharplang/issues/39#issuecomment-...
https://devblogs.microsoft.com/dotnet/announcing-net-5-0-rc-...