News for hackers. Stuff that matters.
Re:.NET 8 by WorldMaker on Tuesday November 14, 2023 @04:54PM (#38270374)
Having moved to writing records by default in many places such as models and "DTOs", primary constructors are a very useful "transition" tool in those cases of "this started as a record, but now needs to be a mutable class for X reasons" and means a little bit less code to entirely rewrite in the first pass. It's also useful for even just "I aesthetically like for my class 'View Models' to mirror their record 'Model' definitions a little closer".

There are no comments on this comment yet.