
Boost : 
Subject: Re: [boost] [variant] Maintainer
From: Larry Evans (cppljevans_at_[hidden])
Date: 20150714 13:18:16
On 07/14/2015 11:16 AM, Nevin Liber wrote:
> On 14 July 2015 at 08:01, Larry Evans <cppljevans_at_[hidden]> wrote:
>
>> What about variant<>, or is that disallowed?
>> If it is disallowed, then tuple<> should, I guess, also be disallowed.
>>
>
> Why?
>
Because of the duality between category products and coproducts:
https://en.wikipedia.org/wiki/Dual_%28category_theory%29
in particular, the following:
https://en.wikiversity.org/wiki/Introduction_to_Category_Theory/Products_and_Coproducts_of_Sets
says:
This is called duality principle. For every construction in category
theory, there's an opposite construction with arrows reversed.
Also, the following:
https://en.wikipedia.org/wiki/Initial_and_terminal_objects
specifically mention empty products and empty coproducts:
a terminal object can be thought of as an empty product...
Dually, an initial object is a colimit of the empty diagram âˆ… â†’ C
and can be thought of as an empty coproduct or categorical sum.
I know it that, at first glance, an empty product or empty coproduct
doesn't make much sense, but, then again, adding 0 to a numerical
sum doesn't make any difference; hence, why is there any need
for 0? Apparently the category people think there's sufficient
reason to define an empty coproduct and empty product; hence, I'd
guess there's some good reason.
Category experts (e.g. Louis Dionne), can you supply some better
explanation?
regards
Larry
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk