News for hackers. Stuff that matters.
Re:Advancing Memory Safety by cogman10 on Tuesday October 15, 2024 @05:02PM (#41853084)
records aren't the structs OP is referring to. Instead, they are thinking of value classes. (at least, that's effectively what a struct means in C#).

You will see `value record Point(int x, int y)` which is different from `record Point(int x, int y)`. The key difference being that `record Point` will create a reference to the x/y data with identity whereas `value record Point` will instead represent that data inline without a reference.

I suspect that `value record` will be the way pretty much everyone starts using `record` as there's basically no reason not to.

There are no comments on this comment yet.