www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4382] New: Same syntax to access items of Proxy and Tuple and more

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

           Summary: Same syntax to access items of Proxy and Tuple and
                    more
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



std.range.Proxy uses .at!(i) to access items, while std.typecons.Tuple uses
.field[i] to access items. Is it possible for them to use the same syntax&name
to access single items?

(A more general comment about the situation: Zip yields Proxies, this is
probably done for efficiency, but makes Zip itself less standard. If Zip yields
Tuples instead this allows people to use it in a more standard way. To maximize
interoperability D2 needs to standardize more its usage of Tuples. A
possibility is to move the Proxy struct to std.typecons and consider both Tuple
and Proxy the two standard ways to create tuples in D2.)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 24 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4382


David Simcha <dsimcha yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dsimcha yahoo.com



Zip yields proxies because it needs to support accessing stuff by reference and
there's no such thing as a ref tuple right now.  Proxy contains pointers, not
values.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 14 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4382




Probably fixed here:

http://www.dsource.org/projects/phobos/changeset/1968

http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=117082

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 08 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4382


bearophile_hugs eml.cc changed:

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


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