<table><tr><td style="">aaronpuchert 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/D15694">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/D15694#333087" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D15694#333087</a>, <a href="https://phabricator.kde.org/p/rjvbb/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;">@rjvbb</a> wrote:</div>
<div style="margin: 0;
          padding: 0;
          border: 0;
          color: rgb(107, 116, 140);"><p>My point here was that making a whatever-you-call it more or less obligatory in something that is (used to be) shared with a closely related language introduces unnecessary confusion ("wait, am I writing C or C++ here"). And extra overhead when reusing algorithms between those languages.</p></div>
</blockquote>

<p>C and C++ have substantially diverged over the years, and aren't really "closely related". They have shared roots, but not only has C++ added tons of features that C hasn't, C has also added features that C++ doesn't support. Consider <a href="https://en.cppreference.com/w/c/language/struct_initialization" class="remarkup-link" target="_blank" rel="noreferrer">designated initializers</a>, variable-length arrays, and the <a href="https://en.cppreference.com/w/c/language/restrict" class="remarkup-link" target="_blank" rel="noreferrer">restrict</a> keyword. Compatibility between the two was never about the implementation, but about being able to share declarations (headers). Reusing algorithms was never on the table.</p>

<p>Even for headers the ability to reuse doesn't come for free, usually some preprocessor magic is required like</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">#ifdef __cplusplus
extern "C" {
#endif</pre></div>



<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>I don't see any good reason why the same syntax wouldn't be used in C.</p></blockquote>

<p>That's up to the C standard committee, not to the C++ committee, and certainly not up to us. I'd appreciate it if we limited the discussion to this change.</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>And I wasn't thinking of a complete overhaul of the syntax, only of the statement name, in this case ("multi" instead of "switch", for instance).</p></blockquote>

<p>As I wrote, that requires changes to the language syntax including new reserved keywords that affect existing code. The attribute syntax doesn't require that, it's already there. But we're not the standards committee, so this is the wrong place to discuss such issues. If you don't like the direction C++ is taking, complain to them and not to me.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D15694">https://phabricator.kde.org/D15694</a></div></div><br /><div><strong>To: </strong>aaronpuchert, KDevelop, mssola, brauch<br /><strong>Cc: </strong>rjvbb, brauch, mssola, kossebau, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd<br /></div>