According to Should we avoid language features that C++ has but Java doesn't?, I know it is horrible to write C++ as if Java, mostly because it drops the beneficial features of C++ languages.
But responding to the point 2 in this question:
C++ code with C++ specific features (e.g.: friend functions, multiple inheritance) can only be maintained or reviewed by C++ programmers, but if we just write C++ like Java (without C++ language specific feature), the code can be maintained or reviewed by both C++ and Java programmers.
I found it seems the following questions supports the statement above:
Is it effective to review code in language I don't know?
Should Junior Programmers be involved as code reviewers in the projects of Senior Programmers?
I think they seems support this point:
1.It allows more people (Java programmers) to review my C++ code
2.It allows Java programmers to learn C++ easier during reviewing my c++ code
I mean I'm not in extreme cases that dropping all C++ features, but I would prefer not using C++ features if the substitutes is not complex, for example, I would not write all C++ classes in .h like a single .java file:
class A{
private:
int b;
void methodC(){
//some other code
}
}
because separating .h and .cpp is easy for C++ newbies. But I would avoid C++ features if the C++ feature can easily be replaced by a pseudo code both for C++ and Java, for example: multiple inheritance, which can be replace by composition + multiple interface.
So My question is, is "letting more people(e.g.:Java programmers) to review my code" a reason to "write C++ like Java" at some degree?