There is c++ code in some user land programs and tools. None in the kernel. You must be a refugee from the land of Linux https://github.com/torvalds/linux contains only kernel sources while https://github.com/freebsd/freebsd-src contains much more than the kernel.I'd rather show something everyone could see and examine. Go to FreeBSD's github for the kernel source here. Half way down on the right you'll see a breakdown of all the languages used like this:
- C61.9%
- C++24.3%
- Roff5.0%
- Shell2.7%
- Assembly2.2%
- Makefile1.2%
- Other2.7%
Third party components.What is contrib ?
rust seems to favor copy-by-value so those numbers - relative to C / C++ - are what I'd expect.From Archive.org 'cause I guess whomever was working on it burned out:
You would, but it would not have success. These are copy instructions that transport values from foo(x) to bar(x) to fluff(x). The only way to pass values down a call chain is by using a copy, and since bar or fluff have no idea where they get called from, they need to copy things down. And you need to copy things or you can not be sure that someone doesn't get a pointer to the original data and changes it. Me old dad had barrels of fun with this in fortran, when someone assigned a new value to a parameter that happened to be PI. The only way to be safe is to call by value, not reference.You would think that LLVM's post-frontend optimizations would compute out many of the moves in static enough code. And those optimizations run the same for C++ and Rust.
You would, but it would not have success. These are copy instructions that transport values from foo(x) to bar(x) to fluff(x). The only way to pass values down a call chain is by using a copy, and since bar or fluff have no idea where they get called from, they need to copy things down. And you need to copy things or you can not be sure that someone doesn't get a pointer to the original data and changes it. Me old dad had barrels of fun with this in fortran, when someone assigned a new value to a parameter that happened to be PI. The only way to be safe is to call by value, not reference.
Looks like it. You have to isolate the environment between calls, so there is no backblast from bad actors/calls/... down the chain. How else do you want to do this, without a very fine grained MMU? And that would be such fun to program, bug free...So this is all about function calls?
https://www.phoronix.com/news/Redox-OS-Porting-Plans "The Current State & Plans For Porting Linux/BSD Software To Redox OS"So here's one benefit to the banter over rust-in-base.
From Phoronix comment #4https://www.phoronix.com/news/Redox-OS-Porting-Plans "The Current State & Plans For Porting Linux/BSD Software To Redox OS"
This one is quite the opposite.
We still have a relatively slow kernel since not much time has been spent on optimizing it." Here's link to the microkernel system design portion of their documentation: https://doc.redox-os.org/book/ch04-01-microkernels.html
This has always surprised me, as solving the context switching overhead problem must be the very first thing a viable microkernel architecture overcomes. And yet it seems that Redox OS has always worked on everything but that, building code for years on top of a microkernel that has not yet solved the critical fundamental problem that doomed all others.
Thus (indirectly) contributing to the bloat we all complain about.In passing, it's remarkable how "disk space usage" and "memory usage" are the least important concerns.
There probably needs to be some rule for software, equivalent to Moore's law for hardware, that states something like "software expands to fill the available hardware capacity". Although I seem to remember 640k was going to be enough for anyone...Thus (indirectly) contributing to the bloat we all complain about.
Well, that's what people using rust appear to think, from the survey results. It doesn't give me a warm glow of confidence.Interesting that compiler bugs feature so high in the annoyance list.
Is the current compiler bug situation really that bad?