www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22701] New: std.typecons.apply needlessly checks if the


          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 puremagic.com
          Reporter: default_357-line 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.

Jan 24 2022