|
|
|
|
|
by WalterBright
1621 days ago
|
|
While the design D picked for templates looks (and is) straightforward, it wasn't obvious. It's only obvious in retrospect (which is something a good design aspires to, like putting an eraser on the other end of the pencil). |
|
My point isn't that "D doesn't meet that bar", but that the GP picked strange points of comparison: the steelman argument for C++ templates would focus on power (e.g. Eigen) instead of principles, and those for Template Haskell on safety instead of practicality. And of course, no macro comparison would be complete without gesturing vaguely in the direction of Lisp while muttering something about parentheses.
It's like the "Always Be Closing" speech in Glengarry Glen Ross: Dlang macros as John Travolta truly do kick ass in that scene—but why not have Al Pacino there to represent as top dog of the local branch?