C# 9

Ryan Schmitt rschmitt at pobox.com
Wed May 20 23:01:52 UTC 2020


The section on "value-based equality and inheritance" makes the overall
approach to records seem like a hybrid between object semantics and value
semantics, and immutability appears to be a strong recommendation rather
than a requirement. If that's the case, then it seems like their chosen
design persona might be closer to Billy Boilerplate (which isn't to
trivialize it).

On Wed, May 20, 2020 at 2:22 PM Remi Forax <forax at univ-mlv.fr> wrote:

> It's always interesting to see what the others do
>   https://devblogs.microsoft.com/dotnet/welcome-to-c-9-0/
>
> For records, it's quite nice, you have a new literal syntax for creating a
> record which we know is very effective thanks to Kotlin and a with
> expression syntax to derive a record instance from an existing one by
> changing the values of some record components (init properties in C#).
>
> And for pattern matching:
>
> https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/pattern-matching
>
> Also i quite don't understand why they don't do target typing on the
> parenthesis expression (tuple) instead of new
>   Point p = (1, 2);
> instead of
>   Point p = new (1, 2);
>
> regards,
> Rémi
>
>


More information about the amber-spec-observers mailing list