-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Open
Labels
RFCRequest For Comments: want input from the communityRequest For Comments: want input from the communityarea: C++
Description
Overview
Currently, we have different file extensions for the C++ source and header files in the Zephyr repository:
Source Files
Header Files
For the sake of consistency, the project should decide on and use only single extension each for the C++ source and header files.
Context
Widely-used conventions
C++ source Files: .cpp, .cxx, .cc, C
C++ header Files: .hpp, .hxx, .hh, h
From the perspective of the Standard C++ Foundation
- What source-file-name convention is best? foo.cpp? foo.C? foo.cc?
- What header-file-name convention is best? foo.H? foo.hh? foo.hpp?
Opinions
Amongst the "widely-used conventions" listed above, some to avoid are:
C(capital C) for source files- This will not play well with the operating systems that do not strictly enforce the case sensitiveness of the file names (e.g. Windows, macOS).
- This is more prone to human errors than having alphabetically different names for the C++ source files and the C source files.
hfor C++ header files- This provides no distinction between the C++ header files and the C header files.
Proposed Change
- Use
.cppfor C++ source files. - Use
.hppfor C++ header files.
Metadata
Metadata
Assignees
Labels
RFCRequest For Comments: want input from the communityRequest For Comments: want input from the communityarea: C++
Type
Projects
Status
No status