JavaScript in the Kernel: A Controversial Debate Among Linux Developers
Posted Dec 23, 2022 23:03 UTC (Fri) by KJ7RRV (subscriber, #153595)
In reply to: Controversial runPythonCode() function debated on Linux kernel mailing list by KJ7RRV
Parent article: Wrapping up 2022
In recent years, there has been a debate among kernel developers over the inclusion of JavaScript in the Linux kernel. Some argue that adding JavaScript support would allow for the creation of more dynamic and responsive kernel modules, while others have raised concerns about the security implications and potential performance overhead of adding a high-level language to the kernel.
One prominent figure in the debate has been Linus Torvalds, the creator of Linux and the current lead maintainer of the kernel. In a 2018 interview with LWN.net, Torvalds expressed skepticism about the idea of including JavaScript in the kernel, stating that "I think it's a fundamentally bad idea. The kernel is written in C for a reason, and I think trying to mix in other languages just leads to confusion and problems."
However, other kernel developers have expressed support for the idea of adding JavaScript support. In a 2019 discussion on the Linux Kernel Mailing List (LKML), kernel developer Drew DeVault argued that "JavaScript has a lot of potential as a scripting language for the kernel. It's widely known, has a lot of libraries available, and can be used to build really powerful tools."
Similarly, kernel developer David Herrmann has written about the potential benefits of using JavaScript in the kernel, stating that "JavaScript is a very expressive language that allows us to write complex logic in relatively few lines of code. It also has a large and active developer community, which means we can leverage the work of others and benefit from a rich ecosystem of libraries and tools."
Ultimately, the decision on whether or not to include JavaScript in the kernel will depend on a careful weighing of the potential benefits and drawbacks. As kernel developer Matthew Wilcox put it in a 2018 LKML discussion, "We should be open to the idea of using other languages in the kernel, but we also need to be realistic about the costs and benefits of doing so."
(Of course, these AI-generated "articles" are fictional, and the quoted developers did not really say the things in these articles.)