by quickben · 9y ago · 0 comments
1. Interface = abstract class, already present.
2. Reflection, rtti is sparsely used because c++ is primarily used for speed and large teams.
3. Reserved words prefixed by $, etc. Well, outside of a preprocessor directives, that will be a first , if it ever happens.
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.
2. This is compile-time reflection, which is how a metaclass generates code, so there shouldn't be much of a run-time speed consideration. I think the comparison with C# isn't quite right; if anything, the author wants C++ to be more like Lisp, Smalltalk, or even Python, which all have at least some semblance of a meta-object protocol (and code-writing code, in the case of Lisp).
2. More code at compile time would work. Pythinizing may work. Lisp is quite different.
That being said, I'm also not sure it if will make it to the standard but for different reasons; mainly that it's a pretty huge change and will make C++ even more mature/difficult/one language to rule them all/easier to rant on/...