Hacker News new | ask | show | jobs
by ratww 1775 days ago
The biggest difference is that Records are Immutable.
1 comments

structs can be made `readonly` as well. The biggest difference IMO is a record is still a class, so it's still copy-by-reference rather than copy-by-value, potentially giving performance gains when passing data around, and leaving a shortcut for value-comparisons (if two variables reference the same object, you obviously know it is the same).