News for hackers. Stuff that matters.
Re:Better C – A subset of D Programming Language by jcelerier on Tuesday April 28, 2020 @01:04PM (#23009055)
could you provide the type of this map function ?

    auto map(auto x) { 
      if constexpr(is_same<decltype(x), int>) {
       struct T1 { int getStuff() { return 0; } };
       return T1 {};
      } else { 
       struct T2 { void doStuff() { } };
       return T2 {};
      }
    }
Re:Better C – A subset of D Programming Language by asdkjh345fd on Tuesday April 28, 2020 @07:55PM (#23013603)
Read the rest of the discussion.