3 ms·
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 wil
by cogman10 2y ago
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.