News for hackers. Stuff that matters.
Re:Post-Architecture: Premature Abstraction Is the Root of A... by neonsunset on Thursday July 18, 2024 @02:54PM (#40998628)
The syntax has improved quite substantially since 2016 for pattern matching at C#'s end, and it's very easy to model ADTs with records (and the experience of using them even before that was decent with methods accepting lambdas).

Today, you write it in a similar way you would write a match in Rust.

Re:Post-Architecture: Premature Abstraction Is the Root of A... by nequo on Thursday July 18, 2024 @11:16PM (#41001776)
How do you represent sum types in C# today? Can enum members hold records as data, or do you do it differently?