Originally posted by geerge
View Post
Announcement
Collapse
No announcement yet.
A 2024 Discussion Whether To Convert The Linux Kernel From C To Modern C++
Collapse
X
-
Originally posted by sophisticles View PostThe irony of the Linux kernel adopting a CoC when their founder is infamously taped flipping off the camera and saying fuck you to Nvidia.
Of all of Linus' infamous rants, I think the Nvidia bird-flip is rather innocent and non-personal. If you watched the video he actually sort of apologized to a Nvidia employees in the room after he had expressed his unequivocal opinion towards Nvidias kernel cooperation.Last edited by Veto; 10 January 2024, 06:37 PM. Reason: Rewatched the video and corrected the apology
- Likes 8
Comment
-
Originally posted by spicfoo View Post
That is correct. Go has a distinctive C influence. Whether this is good or bad depends on what problem you are trying to solve. Go and Rust are both successful languages with growing adoption in an industry that is so full of failed ones. Rust developers often trash Go but don't ask the question as to why Go was successful.- Short learning curve (even if that means "force things that are inherently complicated to seem simple at first glance)
- Giant company backing it (Google may not have poured as much into promoting it as Sun did with Java, but it matters)
- Easier to use as "like Ruby or Python for writing microservices, but faster-executing and with more of a type system"
- None of D's problems with a fractured ecosystem and initially proprietary compiler
Still TL;DR: Asking why Rust didn't compete well with Go is like asking why C++ didn't compete well with Python. Their primary intended niches are too divergent. If anything, the surprising part is that so many people enjoy using Rust in a niche that you'd expect Go to be better suited for.
- Likes 5
Comment
-
Originally posted by cynic View Post
these does not sounds at all like what you say:
"Your comment gave me a good laugh. Not only is Go not a suitable replacement for C,"
"Go is not even in the same class as C, C++, or Rust for the mere fact that it..."
anyway, everyone has its own set of problems with programming languages.
My comment was a direct reply to what Thompson thought were the C problems.
Why do I write Rust for tasks I could do in Go? Because it's easy to use things like PyO3 to expose bindings to my Rust creations in other languages so I can reuse that effort, while the official Rob Pike stance on Go is that "cgo is not Go".
- Likes 1
Comment
-
Originally posted by sophisticles View PostI would rewrite everything in Pascal and release it under an MIT or BSD style license.
Even better, and I am 100% serious about this, write a proper compiler for Python and rewrite the whole thing in Python and release it under a truly free license, a simple 1 line that says "You can do whatever you want with this code".
(If you're not trying to put something into the public domain, it's mostly to do with laws meant to protect people from being exploited by publishers and movie studios where, unless you explicitly list what you're disclaiming, it doesn't get disclaimed, and you also need a secondary piece of legalese to restrict future you/rightsholders from being able to enforce any new "not allowed to be disclaimed before it's been granted" rights that may get written into law.)Last edited by ssokolow; 12 January 2024, 12:41 PM.
- Likes 3
Comment
-
Originally posted by cj.wijtmans View Postthey could simply move from C compiler to C++ compiler and theorertically everything should compile, with some edge cases that need review.
If C++ was to be accepted in Linux, it would need to be for new code only, and cleanly separated from the C code, just like is currently being done for Rust. The idea that transitioning to C++ is less costly than transitioning to Rust is pretty naive.
- Likes 6
Comment
-
Originally posted by moltonel View Post
Ha ha ha, "some edge cases" indeed. It would be madness to do it that way.
If C++ was to be accepted in Linux, it would need to be for new code only, and cleanly separated from the C code, just like is currently being done for Rust. The idea that transitioning to C++ is less costly than transitioning to Rust is pretty naive.
- Likes 2
Comment
-
Originally posted by mercster View PostAs someone who was actually privvy to a lot of the back-and-forth chitchat between some heavy hitters in the Linux dev space starting around 1994/1995... C++ was despised. I'm not enough of a developer to understand why on a technical level (something something inheritance something camel case something), but C++ was thought of as an abomination with no place in any systems project, let alone the kernel. Obviously things change over time... a lot of that attitude may have been trickle down from Linus's fierce dislike. This is good popcorn fodder if nothing else. 🍿
Since you have mentioned inheritance... I do remember a case where a superior of mine did not see the need for inheritance in C++! She preferred to copy&paste C++ classes to create new classes, instead of using a parent class to hold the duplicate code and to let the child classes inherit it. She argued that using copy&paste was quicker (in terms of getting the job done) than creating a parent class.Last edited by sdack; 10 January 2024, 08:36 PM.
- Likes 4
Comment
-
Originally posted by cl333r View PostIt was a mistake adding Rust, they should have waited for Zig imho.
- Likes 1
Comment
Comment