I'm torn about this proposal. One one hand, I like that the feature generalized something that you can (for the most part) already do in C++, and I like the new expressiveness metaclasses would provide.<p>On the other hand, this is kind of insane. C++ is insane. And I'm still not convinced this proposal is more than another bandaid over the fundamental problems with the language. Why do our programming languages keep ending up as terribly complicated and incomplete specifications of scheme or smalltalk?<p>I don't have a better proposal though and do admire the thought and effort given to retrofitting C++ as a modern language
My first reaction to $class was the following: since we are talking about metaclasses, why not use that name instead, that is "metaclass" in place of "$class"?
I don't see this making it into the standard.<p>1. Interface = abstract class, already present.<p>2. Reflection, rtti is sparsely used because c++ is primarily used for speed and large teams.<p>3. Reserved words prefixed by $, etc. Well, outside of a preprocessor directives, that will be a first , if it ever happens.<p>By the look of the thing, the author wants c++ to be more like c#. But c++ isn't restricting on patterns, we create them. Unlike c# there is no language defined way for dependency injection, interfaces etc. Well we can argue that, but c++ is more flexible on pattern creation, and this proposal wants to put two patterns inside the standard. I just don't see it happening.
From the article:<p>> "Compile-time programming consists in defining a region in the codeline where the code is meant to be executed at compile time, with the evaluation of compile time data leading to a result. "<p>Wow, great. So in 2017, C++ is finally able to have a feature that Lisp had since about 1966.<p>Yes, you can call this comment "smug", but my point is less smug and it's the following:<p>C++ has been bloated <i>too much</i>. It used to be a nice OO language -perhaps not as elegant as Objective C- but, as the times advanced, good-intentioned people retrofitted more and more characteristics into C++, but the side efects of these "retrofits" is a chaos that is ultimately leading to more criticism of C++ and more people getting interested in alternatives like Julia and Rust.<p>Julia in particular has a very interesting OOP implementation that includes multiple dispatch, and also has good support for metaprogramming.<p>Rust, as I see it, is a good alternative to C++, and should also work for systems programming.