News for hackers. Stuff that matters.
Re:C# functional language extensions and Erlang-like concurr... by rubber_duck on Sunday January 29, 2017 @03:15PM (#13516319)
Structs are mutable value types. Record types would let you define objects with public getters only and constructor that assigns them and a fancy syntax for creating a new object based on an existing record value + new property values, I think something like

    Point a = b with {X = 0} 
this will make using immutable record types in C# much less tedious. Will also implement other stuff like value equality override, etc. I wish this was in 7.0, this is a great way to do FP in C# when you can't use F#.

Proposal link : https://github.com/dotnet/roslyn/blob/features/records/docs/...

There are no comments on this comment yet.