Moving the kernel to modern C
Moving the kernel to modern C
Posted Feb 27, 2022 18:53 UTC (Sun) by rgmoore (✭ supporter ✭, #75)In reply to: Moving the kernel to modern C by marcH
Parent article: Moving the kernel to modern C
C++ fans are fans of C++ because it lets you do whatever you want
Which is more or less the explanation Linus used for why he doesn't want to move to C++. It isn't about the technical side of the language; it's about excluding people who don't have the discipline to code the way he thinks the kernel should be coded.
Posted Feb 27, 2022 19:05 UTC (Sun)
by camhusmj38 (subscriber, #99234)
[Link] (2 responses)
Posted Feb 27, 2022 21:03 UTC (Sun)
by marcH (subscriber, #57642)
[Link]
No, you're missing the point exactly like all other C++ fans. -Wwla is not a "discipline", it's a compiler flag. A discipline requires some mental effort whereas adding -Wwla to a configuration file requires zero human effort. The computer does all the work.
> one that can be enforced with analysis tools and compiler switches.
Great news: please share now the set of analysis tools and compiler switches that enforce the exact C++ subset kernel maintainers are willing to accept without increasing their code review workload that is already stretched past the limit. For at least all recent gcc and clang versions.
Good luck getting all kernel maintainers to agree on that C++ subset in the first place! So that was a trick question, sorry.
Posted Feb 28, 2022 8:55 UTC (Mon)
by ballombe (subscriber, #9523)
[Link]
Moving the kernel to modern C
It’s OK to say that you don’t want to do it because you don’t know how or are scared to learn new things. But it’s also OK for people to say maybe sheer obstinacy is not a reason to not consider an idea. The cult of personality in this area is not helpful.
Moving the kernel to modern C
Moving the kernel to modern C
