issue215:mon_opinion
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue215:mon_opinion [2025/03/30 11:33] – auntiee | issue215:mon_opinion [2025/04/01 19:01] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 3: | Ligne 3: | ||
For some context, I should mention that the Linux kernel, like most other UNIX-like kernels, has been written mostly in a standard dialect of C. To sum up, the basics of the question is that some developers are in favor of including code in Rust in, at the very least, parts of the kernel source code. Device drivers have been mentioned. But there has been some pushback by other developers who do not agree with this move, in at least one case leading to a discussion about whether code written in Rust should even be able to access routines written in C. Linus has come in very clearly on the topic, setting out that developers responsible for parts of the kernel code who wish to write in Rust may do so, while others may prefer to stick to C. But people must be able to access each other’s code with no hindrance.** | For some context, I should mention that the Linux kernel, like most other UNIX-like kernels, has been written mostly in a standard dialect of C. To sum up, the basics of the question is that some developers are in favor of including code in Rust in, at the very least, parts of the kernel source code. Device drivers have been mentioned. But there has been some pushback by other developers who do not agree with this move, in at least one case leading to a discussion about whether code written in Rust should even be able to access routines written in C. Linus has come in very clearly on the topic, setting out that developers responsible for parts of the kernel code who wish to write in Rust may do so, while others may prefer to stick to C. But people must be able to access each other’s code with no hindrance.** | ||
- | Utiliser Rust ou ne pas l' | + | L’inspiration de cet article est la controverse récente concernant l’inclusion – ou pas – d’un peu de code écrit dans le langage de programmation Rust à l’intérieur du noyau Linux. |
- | L’inspiration | + | Pour un peu de contexte, je dois mentionner que le noyau Linux, comme la plupart des noyaux |
- | Pour un peu de contexte, je dois mentionner que le noyau Linux, comme la plupart des noyaux de type UNIX, est écrit pour la plupart dans le dialecte standard de C. Bref, les bases de la question sont que certains développeurs sont favorables à l’inclusion de code en Rust dans, au moins, des parties du code source du noyau. On a mentionné des pilotes. Mais d’autres développeurs n’en veux pas et ne sont pas d’accord, dans au moins un cas qui a engendré une discussion sur le fait que du code écrit en Rust doive même pouvoir accéder à des routines écrites en C. Linus s’est exprimé clairement sur le sujet, en disant que les développeurs responsables pour des parties du code de noyau qui veulent écrire en Rust peuvent le faire, tandis que d’autres préfèrent rester en C. Mais les gens doivent pouvoir accéder au code d’autres personnes sans entrave. | ||
**There are arguments to be made on both sides of this matter. On the one hand, adding an additional programming language to an already complex kernel source code tree further increases complexity. There are no two ways about that. | **There are arguments to be made on both sides of this matter. On the one hand, adding an additional programming language to an already complex kernel source code tree further increases complexity. There are no two ways about that. | ||
Ligne 13: | Ligne 12: | ||
Also, being able to read and understand the complete source code will be made more complex, since now a working knowledge of both languages would be required. However, it must be said that Rust syntax is actually rather close to C, and, if anything, is slightly more readable. So this argument is actually not really valid, in my view.** | Also, being able to read and understand the complete source code will be made more complex, since now a working knowledge of both languages would be required. However, it must be said that Rust syntax is actually rather close to C, and, if anything, is slightly more readable. So this argument is actually not really valid, in my view.** | ||
- | Des arguments existent des deux côtés du conflit. D’une part, l’ajout d’un langage de programmation supplémentaire dans l’arbre du code source déjà complexe du noyau rendrait les choses d’autant plus complexe. C’est sans équivoque. | + | Des arguments existent des deux côtés du conflit. D’une part, l’ajout d’un langage de programmation supplémentaire dans l’arbre du code source déjà complexe du noyau rendrait les choses d’autant plus complexes. C’est sans équivoque. |
De plus, pouvoir lire et comprendre le code source complet deviendra encore plus complexe, puisque, maintenant, une connaissance opérationnelle des deux langages sera nécessaire. Toutefois, je dois dire que la syntaxe de Rust est en fait plutôt proche de celle de C et légèrement plus lisible. Ainsi, à mon avis, cet argument n’est pas vraiment valide. | De plus, pouvoir lire et comprendre le code source complet deviendra encore plus complexe, puisque, maintenant, une connaissance opérationnelle des deux langages sera nécessaire. Toutefois, je dois dire que la syntaxe de Rust est en fait plutôt proche de celle de C et légèrement plus lisible. Ainsi, à mon avis, cet argument n’est pas vraiment valide. | ||
+ | |||
**On the other hand, Rust is presented as a much more secure programming language than C, specifically as regards memory management. It could be said that Rust has been designed to avoid the typical programming errors that plague beginners coding in C, such as assigning pointers but then not freeing the memory they point to afterwards, or inversely trying to free up too much space, or fringe effects such as modifying what a pointer points to in two code sections at the same time. This is said to be literally impossible in Rust, or, at the very least, much harder to make mistakes. The Rust compiler has very many built-in safeguards to avoid such potentially bad and hard-to-detect mishaps in a critical piece of software as is the kernel.** | **On the other hand, Rust is presented as a much more secure programming language than C, specifically as regards memory management. It could be said that Rust has been designed to avoid the typical programming errors that plague beginners coding in C, such as assigning pointers but then not freeing the memory they point to afterwards, or inversely trying to free up too much space, or fringe effects such as modifying what a pointer points to in two code sections at the same time. This is said to be literally impossible in Rust, or, at the very least, much harder to make mistakes. The Rust compiler has very many built-in safeguards to avoid such potentially bad and hard-to-detect mishaps in a critical piece of software as is the kernel.** | ||
- | D’autre part, Rust est présenté comme étant un langage de programmation beaucoup plus sûr que C, particulièrement en ce qui concerne la gestion de la mémoire. On pourrait dire que Rust a été conçu pour éviter les erreurs typiques de programmation qui tourmentent des débutants qui codent en C, comme assigner des pointeurs, mais ne pas libérer la mémoire indiquée par la suite, ou, inversement, | + | D’autre part, Rust est présenté comme étant un langage de programmation beaucoup plus sûr que C, particulièrement en ce qui concerne la gestion de la mémoire. On pourrait dire que Rust a été conçu pour éviter les erreurs typiques de programmation qui tourmentent des débutants qui codent en C, comme assigner des pointeurs, mais ne pas libérer la mémoire indiquée par la suite, ou, inversement, |
**From the point of view of us *buntu users, what exactly could the potential effects of including more Rust code in the Linux kernel be? These are not very many, in reality. Perhaps the kernel itself would be slightly larger, since it is unavoidable that some routines should be duplicated. We can expect some degree of increase in stability, though it must be said that the current state of affairs is not bad at all from that point of view. What will certainly be impacted is the toolkit one would need to compile a kernel. In addition to the standard GCC compiler suite, one would now need the Rust toolchain as well. In some cases, this may be something of a drawback, such as when porting the kernel for a new physical platform. Preparatory steps will now include not only making sure some version of GCC is available to cross-compile for the new architecture, | **From the point of view of us *buntu users, what exactly could the potential effects of including more Rust code in the Linux kernel be? These are not very many, in reality. Perhaps the kernel itself would be slightly larger, since it is unavoidable that some routines should be duplicated. We can expect some degree of increase in stability, though it must be said that the current state of affairs is not bad at all from that point of view. What will certainly be impacted is the toolkit one would need to compile a kernel. In addition to the standard GCC compiler suite, one would now need the Rust toolchain as well. In some cases, this may be something of a drawback, such as when porting the kernel for a new physical platform. Preparatory steps will now include not only making sure some version of GCC is available to cross-compile for the new architecture, | ||
- | Du point de vue de nous, les utilisateurs de *buntu, | + | De notre point de vue, les utilisateurs de *buntu, |
**Since the Rust compiler uses LLVM for code generation (see the “Rust Compiler Developer Guide”, available online), it may very well be that the complete Linux kernel project may find it best to slowly go from the GCC compiler to LLVM. There already seem to be projects such as Android or ChromeOS that use this latter toolchain, so it could very well be not only possible, but even relatively easy. Once more, this would probably be an issue that most users would hardly even be aware of. | **Since the Rust compiler uses LLVM for code generation (see the “Rust Compiler Developer Guide”, available online), it may very well be that the complete Linux kernel project may find it best to slowly go from the GCC compiler to LLVM. There already seem to be projects such as Android or ChromeOS that use this latter toolchain, so it could very well be not only possible, but even relatively easy. Once more, this would probably be an issue that most users would hardly even be aware of. | ||
Ligne 32: | Ligne 34: | ||
Ainsi, en dernière analyse, tout cela est-il simplement une tempête dans un verre d’eau ? Pas vraiment, il y a plus que cela. | Ainsi, en dernière analyse, tout cela est-il simplement une tempête dans un verre d’eau ? Pas vraiment, il y a plus que cela. | ||
+ | |||
**For those who are not programmers, | **For those who are not programmers, | ||
- | Pour ceux qui ne sont pas des programmateurs, j’aimerais établir un parallèle entre les philosophies différentes des langages de programmation C et Rust et l’utilisation d’une transmission manuelle ou automatique dans un véhicule à moteur. Les gens qui ont l’habitude de changer leurs vitesses à la main le font généralement bien et peuvent même en être fiers. Après un peu de pratique, ils peuvent acquérir un contrôle plus fin sur la transmission de leur voiture et une meilleure sensation des forces transitant l’arbre de transmission pour descendre dans les roues et, en général, une meilleure compréhension des mécanismes du changement de vitesses. Cela ne serait | + | Pour ceux qui ne sont pas programmeurs, j’aimerais établir un parallèle entre les philosophies différentes des langages de programmation C et Rust et l’utilisation d’une transmission manuelle ou automatique dans un véhicule à moteur. Les gens qui ont l’habitude de changer leurs vitesses à la main le font généralement bien et peuvent même en être fiers. Après un peu de pratique, ils peuvent acquérir un contrôle plus fin sur la transmission de leur voiture et une meilleure sensation des forces transitant |
**Is this a good thing? Perhaps so, and perhaps not. But consider: we are speaking of open-source development that is mostly done on a voluntary basis. The average age of contributors may be difficult to ascertain, but some key figures of this world are clearly not going any younger. When current leaders need to step down and hand the reins to the next generation, we will probably have to talk about programming style and whether the more hard-core C language with pointers and whatnot is really suited to the newer programmers’ style or vision of kernel programming. In that sense, Rust may very well be a suitable middle ground to build a bridge between generations. It still retains some of the quirks of C, but there is now a handrail between the walkway and the drop down into the abyss of kernel panic. | **Is this a good thing? Perhaps so, and perhaps not. But consider: we are speaking of open-source development that is mostly done on a voluntary basis. The average age of contributors may be difficult to ascertain, but some key figures of this world are clearly not going any younger. When current leaders need to step down and hand the reins to the next generation, we will probably have to talk about programming style and whether the more hard-core C language with pointers and whatnot is really suited to the newer programmers’ style or vision of kernel programming. In that sense, Rust may very well be a suitable middle ground to build a bridge between generations. It still retains some of the quirks of C, but there is now a handrail between the walkway and the drop down into the abyss of kernel panic. | ||
Ligne 41: | Ligne 45: | ||
Also, have you noticed how some youngsters nowadays are quite incapable of handling a manual transmission properly?** | Also, have you noticed how some youngsters nowadays are quite incapable of handling a manual transmission properly?** | ||
- | Est-ce une bonne chose ? Peut-être bien que oui, peut-être bien que non. Mais n’oubliez pas que nous parlons du développement de l’open source | + | Est-ce une bonne chose ? Peut-être bien que oui, peut-être bien que non. Mais n’oubliez pas que nous parlons du développement de l’Open Source |
- | + | ||
- | De plus, avez-vous remarqué que certains jeunes de nos jours ne savent pas du tout utiliser une transmission manuelle comme il faut ? | + | |
+ | De plus, avez-vous remarqué que certains jeunes de nos jours ne savent pas du tout utiliser correctement une transmission manuelle ? | ||
issue215/mon_opinion.1743327221.txt.gz · Dernière modification : 2025/03/30 11:33 de auntiee