Thread overview
[Issue 5085] New: std.variant.Algebraic name
Feb 26, 2013
Andrej Mitrovic
Feb 26, 2013
Andrej Mitrovic
October 20, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5085

           Summary: std.variant.Algebraic name
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Phobos
        AssignedTo: nobody@puremagic.com
        ReportedBy: bearophile_hugs@eml.cc


--- Comment #0 from bearophile_hugs@eml.cc 2010-10-20 05:04:21 PDT ---
Algebraic data types may be both product types and sum types:

From Wikipedia: http://en.wikipedia.org/wiki/Algebraic_data_types

> Special cases of algebraic types are product types i.e. tuples and
> records (only one constructor), sum types or tagged unions (many
> constructors with a single argument) and enumerated types (many
> constructors with no arguments). Algebraic types are one kind of
> composite type (i.e. a type formed by combining other types).


So std.typecons.Tuple too is an algebraic data type, it's a product type. The data structure implemented by std.variant.Algebraic is just a special case of algebraic data type, it's a sum type.

So it is better if the name of std.variant.Algebraic refers to 'sum type' or a 'tagged union' instead to generic data types.

So maybe "taggedUnion" is a more descriptive name of its purposes for programmers of C-like languages.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 09, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5085


Andrei Alexandrescu <andrei@metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |andrei@metalanguage.com
         AssignedTo|nobody@puremagic.com        |andrei@metalanguage.com


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 26, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=5085



--- Comment #1 from Andrei Alexandrescu <andrei@erdani.com> 2013-02-26 08:54:31 PST ---
I don't think there's an action item that can be derived from this. OK to close?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 26, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=5085


bearophile_hugs@eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


--- Comment #2 from bearophile_hugs@eml.cc 2013-02-26 10:49:21 PST ---
(In reply to comment #1)
> I don't think there's an action item that can be derived from this. OK to close?

Closed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 26, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=5085


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich@gmail.com
         Resolution|FIXED                       |WORKSFORME


--- Comment #3 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-02-26 10:50:18 PST ---
No associated pull -> WORKSFORME.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 26, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=5085



--- Comment #4 from bearophile_hugs@eml.cc 2013-02-26 10:51:27 PST ---
(In reply to comment #3)
> No associated pull -> WORKSFORME.

Isn't WONTFIX more correct for this situation? :-)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 26, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=5085


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WORKSFORME                  |WONTFIX


--- Comment #5 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-02-26 10:52:02 PST ---
(In reply to comment #4)
> (In reply to comment #3)
> > No associated pull -> WORKSFORME.
> 
> Isn't WONTFIX more correct for this situation? :-)

Sure thing.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------