On Sun, Sep 2, 2012 at 12:06 PM, Alexander Solla <[email protected]> wrote:
>
>
> On Sun, Sep 2, 2012 at 9:40 AM, <[email protected]> wrote:
>>
>> The thing is, that one ALWAYS wants to create a union of types, and not
>> merely an ad-hock list of data declarations.  So why does it take more code
>> to do "the right thing(tm)" than to do "the wrong thing(r)"?
>
>
> Because a union type is a complex union of parts, and the parts need to be
> deconstructed in order to be acted upon.  There is not a unique way to do
> this -- different "unwrappings" have different properties and must match
> your use case.
>
> Perhaps you should read "Data types ala carte" (W. Swiestra) [1], which
> provides an approach to constructing "open" data types (i.e., sum types to
> which new summands can be added)
>
>
> [1] http://www.cs.ru.nl/~W.Swierstra/Publications/DataTypesALaCarte.pdf
>

If you're going to suggest that line of thinking you might also the
concept of rows in general.., though I'm not sure that's really quite
what he wants.

kris

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to