www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21260] New: Constraints on user code are private, so user

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

          Issue ID: 21260
           Summary: Constraints on user code are private, so user cannot
                    check them or understand what they do
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: andrei erdani.com

Example:

https://dlang.org/library/std/algorithm/iteration/each.each.html

isForeachIterable and isRangeIterable are private and rather complex. They are
neither documented, nor accessible to user code. The user's only chance is
peruse the source code or "build and pray".

All constraints on public-visible code should have public visibility.

--
Sep 17 2020