Hello!
I wanted to create a few interface-classes in a rather new project. Other programming languages, as C#/Java commonly agree on writing file names in a way similar to: IMyClass
Personally, I use underscore within C++, just because I tend to go for long variable-names and it improves readability. Hence writing file-names with underscore seems just the native decision. Now, the I-prefix is pascal-case, which astonishes me in general, because iMyClass is more readable, but anyway: I would rather not want to use it and of course, nobody could force me to do so anyway.
Nonetheless, I would like to know how you tackle interfaces in C++ in terms of naming?
Currently, I'm considering:
i_my_class.cpp (which looks a bit weird, never seen this before)
imy_class.cpp (less readable)
interface_my_class.cpp or my_class_interface.cpp
I even thought about omitting the interface/prefix altogether in C++. Curious on how you deal with this!
Thanks for your time!
↧