It is the year 2020: why should I use / learn D?

Jacob Carlborg doob at me.com
Wed Nov 14 19:53:12 UTC 2018


On 2018-11-14 20:23, H. S. Teoh wrote:

> I want to hear more about this.  D's templates are darned powerful, and
> the syntax is far more readable (and writable!) than C++'s, but for
> certain use cases, like manipulating AliasSeq's (aka "type tuples") it's
> just not the right idiom, and often leads to quadratic or even
> exponential template expansion, which causes template bloat and often
> dog-slow.
> 
> Sometimes I find myself wishing that types were first-class compile-time
> "variables", and that you could write code that manipulates them
> directly, e.g., append a type to an array of types from inside a foreach
> loop, which is much more readable (and writable!) than a recursive
> template that you have to use today.

That's exactly what he's referring to (correct me if I'm wrong).

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list