mcintyre321 / ValueOf

Deal with Primitive Obsession - define ValueObjects in a single line (of C#).
MIT License
868 stars 40 forks source link

ValueOf vs Records #18

Open respel opened 3 years ago

respel commented 3 years ago

Now that we have records in C#, what's the benefit of using this library over them? Have you considered deprecating this and redirecting potential users to use records?

Paul-Williams commented 3 years ago

Records are only 'officially' available in .NET 5 and higher, not from .NET Framework or Core. See: https://tooslowexception.com/6-less-popular-facts-about-c-9-records/

silver-dragon commented 3 years ago

Records don't work in VB.NET whereas this package works great.

AraHaan commented 2 years ago

VB.NET is dead where as C# is not dead.

SteveDunn commented 2 years ago

Records on their own are not a complete answer to Value Objects. Take a look at Vogen to see if it fits your needs. It has additional constraints on the usage and creation of value objects - in the form of compilation errors and runtime checks.

https://github.com/SteveDunn/Vogen