2 ms·
Absolutely not. Records generate a lot of code when you compile them, including methods to compare by value. The boilerplate required to do that in C# without
by smt88 6y ago
Absolutely not.
Records generate a lot of code when you compile them, including methods to compare by value.
The boilerplate required to do that in C# without records is extensive and hard to maintain. Even structs, which are supposed to be value objects, are not easy to compare by value.
I'll put it this way: records are important enough that I stopped using C# because it lacked something like records, and now I'm going to pick it up again.