[Issue 18124] New: Over-use of `auto` return type in std.regex

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Dec 25 03:16:25 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=18124

          Issue ID: 18124
           Summary: Over-use of `auto` return type in std.regex
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: dhasenan at gmail.com

auto return types are terrible for documentation. You need to include the full
documentation of the return type in the function description, or you need to
separately link to the return type. It's a lot nicer and more efficient to
simply fill in a concrete return type (when not using voldemort types).

std.regex uses `auto` as a return type rather a lot. Sometimes it has okay
documentation for what the return type is. Sometimes it doesn't. PR incoming.

--


More information about the Digitalmars-d-bugs mailing list