3 ms·
Well, at least he doesn't use a dynamically typed language. Do you have a hunch when algebraic datatypes will arrive for c#? I know there is now a sort of prop
by exceptione 2y ago
Well, at least he doesn't use a dynamically typed language.
Do you have a hunch when algebraic datatypes will arrive for c#? I know there is now a sort of proposal, but will it take years?
- neonsunset 2y agoIt will take some time because there is a lot of work to be done for C# language features. I think they are partially overrated because 1. C#'s type system is quite expressive already and 2. C# has excellent pattern-matching support. Sure, union type definition is a nicer experience in F#, but outside of it there are surprisingly few differences in terms of user experience.
- exceptione 2y agoComing from the Haskell world, I sorely miss the speed of nailing a precise and elegant data model with sum types. Exhaustiveness checks are a big one for me. For each default case I wish that my type checker would be smarter. I know that records can have multiple constructors, but it escapes my why we cannot seal those records so exhaustiveness checks are free. A default case is somewhat like a final block for an exception, whereas I want compile time cursing. F# Sums are indeed nicer (also tons better syntax than Typescript uses).