<table><tr><td style="">kossebau added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D19565">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
          color: #6B748C;
          font-style: italic;
          margin: 4px 0 12px 0;
          padding: 8px 12px;
          background-color: #F8F9FC;">
<div style="font-style: normal;
          padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D19565#678799" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: line-through;">D19565#678799</a>, <a href="https://phabricator.kde.org/p/alex/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;">@alex</a> wrote:</div>
<div style="margin: 0;
          padding: 0;
          border: 0;
          color: rgb(107, 116, 140);"><p>I am wondering if there is really a need for it. SourceExtension seems completely unused and HeaderExtension is only used in okteta.</p>

<p>Though in KDE code, Qt code  (and most other that I know of) it is the ".h" extension is the most common one for headers.</p>

<p>Are there any reasons for having it that I am not aware of?</p></div>
</blockquote>

<p>KF targets also consumers outside of KDE spheres, which are not bound to KDE's suffix tradition/culture (and any need to stay backward-compatible to that), so just looking at Qt & KDE is not enough. The world is bigger ;)</p>

<p>Try e.g.<tt style="background: #ebebeb; font-size: 13px;">find /usr/include/ -name "*.hxx"</tt> and <tt style="background: #ebebeb; font-size: 13px;">find /usr/include/ -name "*.hpp"</tt> to see that developers of other projects prefer those suffixes for C++ headers.  Using <tt style="background: #ebebeb; font-size: 13px;">.h</tt>, so the same suffix as used for C headers, has the disadvantage that one cannot tell the type by just the siuffix, and most MIME type guessers also fall flat due to not reliable magic bytes.</p>

<p>When it comes to the source suffix, there also are bigger subcultures preferring something else than <tt style="background: #ebebeb; font-size: 13px;">.cpp</tt>, not sure where the others are coming from.</p>

<p><a href="https://en.wikipedia.org/wiki/C++" class="remarkup-link" target="_blank" rel="noreferrer">https://en.wikipedia.org/wiki/C++</a> lists these suffixes being more widely used: .C, .cc, .cpp, .cxx, .c++, .h, .H, .hh, .hpp, .hxx, .h++. And while the C++ Core guidelines these days recommend .h and .cpp for new-from-scratch projects (see <a href="https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rs-file-suffix" class="remarkup-link" target="_blank" rel="noreferrer">https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rs-file-suffix</a>) they also acknowledge there are other traditions. And there are people who think the reasoning for using .h (mixing C and C++) is poor when it comes to C++-only headers. and for the before-mentioned reasons having a dedicated own suffix for headers would be better.</p>

<p>All in all these flags allows for nicer integration of kocnfigcompiler generated code over forcing KDE's current traditions onto others. If you ask me, actually more of KDE should switch to use some non-h suffix for headers as well where possible, less guess work needed whether a header is C or C++..</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R237 KConfig</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D19565">https://phabricator.kde.org/D19565</a></div></div><br /><div><strong>To: </strong>kossebau, Frameworks, apol<br /><strong>Cc: </strong>alex, apol, kde-frameworks-devel, LeGast00n, cblack, michaelh, ahmadsamir, ngraham, bruns, vkrause<br /></div>