www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5910] New: Stride members' documentation comments are wrong

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

           Summary: Stride members' documentation comments are wrong
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Optlink
        AssignedTo: nobody puremagic.com
        ReportedBy: andrej.mitrovich gmail.com



21:39:22 PDT ---
It seems the following std.range Stride members have the exact same comments as
Retro. I guess it was a case of copy & paste, and its reflected in the online
documentation:

opIndex(size_t n);
    Forwards to input[input.length - n + 1]. Defined only if R is a random
access range and if R defines R.length.

void opIndexAssign(ElementType!(R) val, size_t n);
    Forwards to input[input.length - n + 1]. Defined only if R is a random
access range and if R defines R.length.

ElementType!(R) moveAt(size_t index);
    Forwards to input[input.length - n + 1]. Defined only if R is a random
access range and if R defines R.length.

typeof(this) opSlice(size_t a, size_t b);
    Forwards to input[input.length - n + 1]. Defined only if R is a random
access range and if R defines R.length.

---------------

These are all wrong. The first one should be:
'''
opIndex(size_t n);
    Forwards to input[n * n]. Defined only if R is a random access range and if
R defines R.length.
'''

and the rest need to be updated based on the implementation. (I think all of
these should be replaced with "input[n * n]")

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 29 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5910


kennytm gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://www.digitalmars.com/
                   |                            |d/2.0/phobos/std_range.html
                   |                            |#stride
                 CC|                            |kennytm gmail.com
          Component|Optlink                     |websites
           Platform|Other                       |All
         OS/Version|Windows                     |All



Better not conflate the two "n"s :)

opIndex(size_t i);
    Forwards to input[i * n]. (etc.)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 30 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5910




06:50:37 PDT ---
Oh right, it's _n * n in the code. I think a better name for "_n" is 'step'.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 30 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5910


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: -------
Apr 30 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5910


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

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



07:28:39 PST ---
Stride is gone and was replaced with an auto return function 'stride'. All of
that documentation is gone now.

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