Sometimes I just need .h but not .cpp file, eg : interface class or enum class, and when the class list is displayed on file list of IDE (eg:Xcode):
Animal.cpp
Animal.h
Cat.cpp
Cat.h
Dog.cpp
Dog.h
IEnumerable.h
Lizard.cpp
Lizard.h
MyEnum.h
Penguin.cpp
Penguin.h
I felt uncomfortable to see this file list because IEnumerable and MyEnum don't have their own .cpp file, and I feel the file list will be more tidy if every .h is associated with a .cpp:
Animal.cpp
Animal.h
Cat.cpp
Cat.h
Dog.cpp
Dog.h
IEnumerable.cpp
IEnumerable.h
Lizard.cpp
Lizard.h
MyEnum.cpp
MyEnum.h
Penguin.cpp
Penguin.h
So my question is, is the readability of file list in IDE a reason to keep empty .cpp file even if when I don't need it?