4 ms·
I just use struct because access defaults to public. Inheritance is almost always public, and I prefer to declare public members at the top of my class for read
by marshray 9y ago
I just use struct because access defaults to public. Inheritance is almost always public, and I prefer to declare public members at the top of my class for readability. I don't see any profound lessons of software engineering arising from the C++ definitions of class and struct. I don't read class and struct as having strong semantic conventions communicating intent. I don't see a significant problem with the way we currently define interfaces using them.
I'm sure I'm just used to things the way they are, but this does not seem to me like a strongly motivating example for metaclasses.