Thoughts on Herb Sutter's Metaclasses?

Chris Katko ckatko at gmail.com
Tue Apr 10 01:17:43 UTC 2018


https://www.youtube.com/watch?v=6nsyX37nsRs

I'm really happy with the way languages are finally progressing. 
I've said for years that we should be able to program the "rules" 
(e.g. code guidelines) that programmers then abide by, so that 
they are statically checked.

DScanner is an example. But the core flaw is... it's "rules of 
thumb". That's great. But what about "rules for MY projects" or 
"rules for THIS SPECIFIC CODE TEAM."

I love D's templates. I'm doing stuff I never thought possible 
like accidentally re-inventing Pass-by-Name / "Named Parameters" 
completely at compile-time / zero run-time overhead.

https://en.wikipedia.org/wiki/Named_parameter

Anyhow, I wonder what the D community thinks about this kind of 
meta-programming, and how much D already can do without 
metaclasses, and whether D could possibly benefit from 
implementing them.

Thanks.


More information about the Digitalmars-d mailing list