www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12347] New: adjoin!SingleFun does not return a tuple

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12347

           Summary: adjoin!SingleFun does not return a tuple
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: monarchdodra gmail.com


--- Comment #0 from monarchdodra gmail.com 2014-03-11 04:26:40 PDT ---
It simply aliases to SingleFun.

While it sounds like a good idea on paper, in practice, it is actually
counter-productive:

In non-generic code, no-one will use adjoin for a single function.
In generic code, it becomes counter productive, since the caller will have to
explicitly handle single arg cases, since the result can't be statically
indexed or iterated on. This *forces* the user to handle it explicitly in a
different branch.

Given the design, we might as well return a tuple: Then the user *may* handle
it differently, if he so wishes, but it will still work even without special
handling.

Also, it goes against documentation. The documentation states that a tuple is
returned.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 11 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12347


Peter Alexander <peter.alexander.au gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |peter.alexander.au gmail.co
                   |                            |m


--- Comment #1 from Peter Alexander <peter.alexander.au gmail.com> 2014-03-15
11:47:59 PDT ---
Shall we close this as WONTFIX now? The pull was rejected.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 15 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12347


monarchdodra gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


--- Comment #2 from monarchdodra gmail.com 2014-03-15 15:55:27 PDT ---
(In reply to comment #1)
 Shall we close this as WONTFIX now? The pull was rejected.

Arguably, it became an ER to change it's documented behavior according to what it's actually doing. Filing that would be work though, so yes, WONTFIX. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 15 2014