[Issue 22701] New: std.typecons.apply needlessly checks if the predicate is callable

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 24 11:46:19 UTC 2022


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

          Issue ID: 22701
           Summary: std.typecons.apply needlessly checks if the predicate
                    is callable
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: default_357-line at yahoo.de

As I said in my DConf talk, __traits(compiles) is Satan, the Great Deceiver.
The presence of is(typeof()) in the definition of `apply` needlessly turns a
clear, readable error in the passed lambda into an incomprehensible template
error that requires advanced language knowledge or blind guessing to untangle.
And there's no point, because there's only one apply function! It should just
be removed.

--


More information about the Digitalmars-d-bugs mailing list