News for hackers. Stuff that matters.
Re:Go: What We Got Right, What We Got Wrong by neonsunset on Friday January 05, 2024 @11:12AM (#38880639)
C# records default to immutability. However, struct records being a lower level construct default to mutable (which can be changed with readonly keyword):

    record User(string Name, DateOnly DoB); // immutable
    record struct Cursor(int X, int Y); // mutable
    readonly record struct Point(int X, int Y); // immutable

There are no comments on this comment yet.