c++standards

How to request a c++ feature?


How could I request a C++ feature ? Who do I have to write to ?

The feature I would like to request is a mere syntax commodity : When using composition, we need a better syntax in order to provide method forwarding.

Something like what follows :

class Object{
    InnerObject* inner;
public:
    using inner->method; //<-- here
};

Such a feature would entice people to use composition instead of inheritance for object reuse.

Note : For instance, this can be simulated through the use of MACROS, as shown here { Method forwarding with composition instead of inheritance (using C++ traits)}.


Solution

  • Probably SO is the wrong place for your question (programmers might be a better place for it). However:

    All this wil take you many years!

    Notice that C++14 is a huge language (its specification document -see draft n3797- is heavy enough to kill someone who is thrown it) and I guess there is a heavy social and economic pressure to avoid increasing it.

    Be aware that some very bright people worked several years to propose new features to C++ that ultimately become rejected (or postponed for many years)!

    (for examples, Google for "concepts in C++" or "modules in C++").

    BTW, you might have a more pragmatic approach to your concern. Have some specialized C++ code generator to fit your needs (that generator could be a macro-processor like gpp or m4, some specialized script in Python or Awk, or some external program like ANTLR or Qt's moc, or even a translator from some other language to C++ like MELT...).