Thread overview
[Issue 12736] @nogc std.algorithm.all
Jul 12, 2017
RazvanN
Jul 12, 2017
Jon Degenhardt
Jul 13, 2017
Jon Degenhardt
Feb 09, 2018
Seb
Dec 25, 2019
berni44
Dec 17, 2022
Iain Buclaw
December 06, 2014
https://issues.dlang.org/show_bug.cgi?id=12736

sinkuupump@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sinkuupump@gmail.com
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=13458

--
July 12, 2017
https://issues.dlang.org/show_bug.cgi?id=12736

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |razvan.nitu1305@gmail.com
         Resolution|---                         |INVALID

--- Comment #1 from RazvanN <razvan.nitu1305@gmail.com> ---
Why is this an issue? all calls find which is non-nogc. Closing as invalid

--
July 12, 2017
https://issues.dlang.org/show_bug.cgi?id=12736

Jon Degenhardt <jrdemail2000-dlang@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jrdemail2000-dlang@yahoo.co
                   |                            |m

--- Comment #2 from Jon Degenhardt <jrdemail2000-dlang@yahoo.com> ---
Seems a legitimate enhancement request, and in line with the longer term goal of having Phobos be @nogc when possible. In this particular case, there doesn't appear to be any reason why the functionality implemented by std.algorithm.all cannot be @nogc. And, std.algorithm.find could be @nogc as well in this case.

Personally though, I would hesitate to write an enhancement request against each individual function in Phobos for every attribute, and instead have a larger placeholder ticket for larger blocks of Phobos, for example, a ticket for all of std.algorithm. The above is a policy question of course, but if done this way then this ticket could be closed as a duplicate of the larger ticket, rather than closing it as invalid.

As aside: std.algorithm.find is @nogc for certain argument types. Example:

@nogc @safe nothrow pure unittest
{
    import std.algorithm : find;
    import std.range : iota;

    assert(find(iota(1,5), 3) == iota(3,5));
}

--
July 13, 2017
https://issues.dlang.org/show_bug.cgi?id=12736

Jon Degenhardt <jrdemail2000-dlang@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #3 from Jon Degenhardt <jrdemail2000-dlang@yahoo.com> ---
Valid enhancement request, so reopening. If closed, should have a justification indicating the mechanism expected to eventually achieve the enhancement, or an explanation of why it the request is invalid at the API level.

--
February 09, 2018
https://issues.dlang.org/show_bug.cgi?id=12736

Seb <greensunny12@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greensunny12@gmail.com

--- Comment #4 from Seb <greensunny12@gmail.com> ---
the problem here is auto-decoding and that it can throw an exception, The following works as expected:

---
void main() @nogc {
    import std.ascii: isDigit;
    import std.algorithm: all;
    import std.utf : byCodeUnit;
    auto b = "12".byCodeUnit.all!isDigit;
}
---

It has long being proposed to disable auto-decoding by introducing an RCString. I'm not sure whether this should be kept open, because the issue is not on `all`'s side - all it does is calling `popFront` of string - which happens to be @nogc (due to throwing UTF Exceptions).

--
December 25, 2019
https://issues.dlang.org/show_bug.cgi?id=12736

berni44 <bugzilla@d-ecke.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@d-ecke.de
                 OS|Windows                     |All

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

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--
December 01
https://issues.dlang.org/show_bug.cgi?id=12736

--- Comment #5 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/phobos/issues/10053

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--