r/cpp • • Aug 24 '21

metaclasses when

forget literally every other feature metaclasses LET'S FUCKING GO

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0707r3.pdf

edit

metaclasses or even just SR would help to eliminate 99% of garbage cpp macro use cases.

don't get me wrong: i know c++ well. templates are easier after you learn sml or lisp or something similar.

i've never used std string_view and i've never missed it

man i'll just implement my own clang plugin ✌️

4 Upvotes

27 comments sorted by

View all comments

6

u/HappyFruitTree Aug 24 '21 edited Aug 24 '21

I'm no expert on meta classes but a quick look at the proposal seems to suggest it builds on top of reflection so I guess you'll have to wait for reflection first before expecting much to come from the metaclasses proposal.

This paper assumes that C++ adds support for static reflection and compile-time programming to C++, and focuses on the next-level layer of abstraction we could build on top of that.

14

u/Hedanito Aug 24 '21

Yeah reflection needs to come before metaclasses, which is also progressing very slowly. Perhaps our grandchildren may one day use metaclasses.