Raman Fedaseyeu

Results 52 comments of Raman Fedaseyeu

Is there any conclusion on this idea? (would be nice to have / doesn't fit the library / ...)

A great digest 👍 In the meanwhile, there is a young library that generates sum-types (-alike classes) for you: https://github.com/werediver/sum_types.dart (is this shameless plug an off-topic?)

@wkornewald The untagged unions concept sounds nice, but it doesn't sound like a replacement to the algebraic data types. They can totally coexist and serve different needs. (not clear which...

@xsahil03x You may like another solution [mentioned earlier](https://github.com/dart-lang/language/issues/546#issuecomment-525172871) in this thread: [sum_types](https://github.com/werediver/sum_types.dart) (also on pub.dev). It has proven to be very useful in practice and (by now) it has noticeably...

@xsahil03x There are reasons behind the design of `sum_types` (the required boilerplate is a single class with case-constructors, not sure why you mentioned a _bunch of classes_). The boilerplate buys...

@wkornewald The untagged unions concept sounds nice, but it _doesn't_ sound like a replacement to the algebraic data types. They can totally coexist and serve different needs.

> what is missing from union types that is absolutely necessary from a practical point of view? That is quite easy to answer: extra semantics. ```haskell data Message = Info...

We're clearly carelessly mixing different programming languages and terminology, so let's be more precise. @wkornewald: > We don't really have to use an explicit "data" keyword ... I used the...

@wkornewald I had to read the [proposal](https://github.com/dart-lang/sdk/issues/4938#issuecomment-396005754) to make a good sense out of your arguments, but in the end I like how you combine features there. Indeed, the union...

@wkornewald But did you pay attention to [the reply](https://github.com/dart-lang/sdk/issues/4938#issuecomment-403750147) of @eernstg to you original proposal? He is basically saying that the union types don't help a compiler [that much] to...