Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

C# gets close to this with records + pattern matching, F# discriminated unions are even better for this with algebraic data types built right in. A Result<'T,'Error> makes invalid states unrepresentable without any ceremony. C# records/matching works for now, but native DUs will make it even nicer.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: