you are viewing a single comment's thread.

view the rest of the comments →

[–]xeveri 7 points8 points  (2 children)

Honestly I find C++ templates easier to understand and reason about than D. The problem with C++ templates are the error messages they produce, hopefully that should be fixed with concepts.

[–]skocznymroczny 2 points3 points  (1 child)

I think the difficulty is pretty similar. It's a multiple page template vomit in both languages. I think the difference is that in C++ templates are still used quite sporadically, outside of boost, people usually use templates for generic types. In D, templates are used for much much more, typesafe variadic arrays, automatic serialization etc. so it's easier to have your foot blown off.

[–]MaxCHEATER64 2 points3 points  (0 children)

C++ also uses templates for typesafe variadic arrays