January 07, 2017
https://issues.dlang.org/show_bug.cgi?id=16073

--- Comment #11 from github-bugzilla@puremagic.com ---
Commits pushed to stable at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/06c9dca2daf3edfde85ba01a9d22d842621fad1c [Issue 16073] Fix incorrect uses of random access range primitives in std.range.package

https://github.com/dlang/phobos/commit/86ef3a224ed05bfe52b63caedc53ebdcf5be513e Merge pull request #4463 from JackStouffer/issue16073

--
January 20, 2017
https://issues.dlang.org/show_bug.cgi?id=16073

Jonathan M Davis <issues.dlang@jmdavisProg.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |issues.dlang@jmdavisProg.co
                   |                            |m

--- Comment #12 from Jonathan M Davis <issues.dlang@jmdavisProg.com> ---
(In reply to greenify from comment #10)
> > All of these useless options left to sloppy range implementations don't bring value.
> 
> This has probably been proposed before, but what about letting the compiler insert an opDollar alias if length is defined? This should greatly help to avoid sloppy implementation differences and one can still opt to use the opDollar overloads for superior performance.

https://issues.dlang.org/show_bug.cgi?id=7177 covers fixing it so that ranges that define length automatically get opDollar, but it's never gone anywhere. There has been discussion on it from time to time, but without implementing it, requiring ranges to work with $ is going to break a lot of code, since odds are that very few folks are implementing opDollar. Phobos itself doesn't do it consistently.

But it's pretty ridiculous that we can't use $ with anything but arrays (which is basically where we sit now), and it really should be fixed. I did fix it some time ago so that isRandomAccessRange and hasSlicing verify that $ works correctly if it works (at least verifies it as much as can be done statically), but they've never required that $ works, because so few ranges implement opDollar, and issue #7177 has never been implemented. I'd have changed isRandomAccessRange and hasSlicing to require that $ work years ago if it weren't for that.

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=16073

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3

--
1 2
Next ›   Last »