Feedback on Átila's Vision for D

Atila Neves atila.neves at gmail.com
Tue Oct 15 16:17:57 UTC 2019


On Tuesday, 15 October 2019 at 13:55:28 UTC, SrMordred wrote:
> I Love to see more concrete words about future D.
> Keep the good work!
>
> also, waiting for the nicer traits api:
>
> //D
> const isAddable = __traits(compiles, (T t) { return t + t; });
> //C++20 concepts
> concept isAddable = requires (T x) { x + x; };
>
> Losing to C++ is unacceptable ;)

Meh:

//C++20 concepts
concept isAddable = requires (T x) { x + x; };

// D
enum isAddable(T) = is(typeof((T x) => x + x));


We lose by one character ;)


More information about the Digitalmars-d mailing list