Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
That's not backwards compatibility. I can take any standard C99 code (*) and compile it with whatever GCC currently has as its default (don't know; don't care) without changing anything. (There may be issues with library availability, etc. for very old software, but that isn't the fault of C). Automatic "migration" is nice, but it isn't backwards compatible.Rust claims here they have backwards compatibility with their editions: https://doc.rust-lang.org/edition-guide/editions/
gets, the only truly dangerous C function.C has added a few new keywords without breaking anything, maybe the pre-processor and headers are actually useful for something after all...However, there are times when it's useful to make backwards-incompatible changes to the language. A common example is the introduction of a new keyword. For instance, early versions of Rust didn't feature the async and await keywords.
If Rust had suddenly introduced these new keywords, some code would have broken: let async = 1; would no longer work.
Rust (iron oxide) is formed when iron is exposed to oxygen and moisture. Rust impacts the structural integrity of the iron and is best dealt with as soon as possible as the rough surface can trap moisture and accelerate the rusting process.What is rust and why is it bad? Can someone explain it in laymen's terms?
And mixing Rust and C++ is just asking for trouble. They don't mix very well and the Rust solution is, of course, more Rust. (hence the dumb joke)Andreas Kling said:When we originally evaluated Rust back in 2024, we rejected it because it’s not great at C++ style OOP. The web platform object model inherits a lot of 1990s OOP flavor, with garbage collection, deep inheritance hierarchies, and so on. Rust’s ownership model is not a natural fit for that.
I've just installed Rust. I've written the following test program, using async as a variable name per their example.That's not backwards compatibility. I can take any standard C99 code (*) and compile it with whatever GCC currently has as its default (don't know; don't care) without changing anything. (There may be issues with library availability, etc. for very old software, but that isn't the fault of C). Automatic "migration" is nice, but it isn't backwards compatible.
* Only one function has been removed,gets, the only truly dangerous C function.
fn main()
{
let async = 1;
println!("async = {}", async)
}
Because the old code is incompatible with the new edition. If you wanted to upgrade to the new edition, you would have to spend some amount of time modifying your code so that it would run. The versioning means you can still compile as if you still had an old compiler, but that’s not backwards compatibility.I've just installed Rust. I've written the following test program, using async as a variable name per their example.
Code:fn main() { let async = 1; println!("async = {}", async) }
Running the command 'rustc test.rs' will successfully compile a binary without any errors or warnings. This is because it defaults to the 2015 edition of Rust, the 1.0 release. However, when I run the following 'rustc --edition 2018 test.rs', it errors out because async is a reserved keyword. Sorry, I'm confused at how that's not backwards compatibility?
I suppose that you could consider that to be backwards compatible in that you can take old code and run it through a newer compiler, however, if you wanted to use something else from a newer edition then you would have to change it. Defaulting to 1.0 unless you explicitly tell it otherwise is a workaround for the lack of backwards compatibility (because Rust deliberately chose to discard the mechanisms which C uses to deal with this).I've just installed Rust. I've written the following test program, using async as a variable name per their example.
Code:fn main() { let async = 1; println!("async = {}", async) }
Running the command 'rustc test.rs' will successfully compile a binary without any errors or warnings. This is because it defaults to the 2015 edition of Rust, the 1.0 release. However, when I run the following 'rustc --edition 2018 test.rs', it errors out because async is a reserved keyword. Sorry, I'm confused at how that's not backwards compatibility?
atomic_int. This will still compile with -std=c11 (because I didn't include the new header), so I can also use other C11 features, such as unnamed struct/union members.int main(void) {
int atomic_int = 1;
return 0;
}
_Atomic (reserved) and the header defines atomic_int.)The technical reasons for it being 'bad' seem to get mentioned far less. I think compile times are slow, but I'm sure there are more.
The thing with memory safety and C++ is that it gets better and better every year. It's not the 90's anymore. People use standard libraries that are very mature for most things. Tooling and testing have gotten better and better to catch things like this. And I would have thought, though I've been out of the business for a while, that modern AI tools are excellent for catching memory problems in code.
You're not kidding. Whilst I accept that it's a young project, I compared the Rust version of coreutils (which I just compiled on my system) with the standard C version pre-installed on Ubuntu. I gave Rust the benefit of building with the flags to optimise for binary size, also.The whole Crates system defaults to making large monolithic builds with most dependencies included. This wouldn't be bad for a web browser, but it's not great for system tools that might need to live on embedded hardware. There's an ls replacement called exa. ls is 162kb while exa is 900kb!
Thanks for that. It honestly jibes with what I feel is probably the case. Maybe one of the people who actually still works with C++ can comment. I think @The Ugly One does? But I really feel like they make more of a meal out of Rust's 'advantages' than they really should, in order to drive the political side. I would be interested to see how much real world Rust development deliberately side-steps some of the safety features, which I believe you can do.A lot of that started around C++11 I think? I haven't touched C++ in years, but as I understand it now, you shouldn't every have to worry about unsafe operations like using the wrong delete (delete vs delete[] for arrays) so long as you use a good code linter and adhere to all the new syntax.
There's also "CHERI," a system for handling possible security issues within the CPU hardware itself. Hardware solutions make more sense to me than trying to rewrite everything in a new language. Most CHERI enabled SoCs are still prototypes or experimental though.
Might be better to compare it to BusyBox then, or some other combined userspace blob. I think busybox rocks in at under 3MB.N.b. this is a combined total of all since the C based one are individual binaries and Rust by default compiles as one big blob.
In theory, but busybox has a bunch more things in it than coreutils so it's not a fair compari.... Oh, wait. My busybox binary is still smaller than the Rust Coreutils and wins anyway.Might be better to compare it to BusyBox then, or some other combined userspace blob. I think busybox rocks in at under 3MB.
He sees the writing on the wall probably. The trannysphere and its supporters have been hard at work shilling Rust, which means newer generations of programmers are going to stick with it. If he doesn't do this, once C++ boomers start dying off or retiring, maintaining the codebase is gonna be hard.But then it's a long time since I've done systems programming. The guy seems to really feel they need to move away from C++. I honestly don't quite get it but he's in a better position to know than I am.
Is it really that dire? Maybe I should dust off my own C++ skills. Might be able to make some pretty sums when it comes to maintaining old systems. Although perhaps AI will eat that market.He sees the writing on the wall probably. The trannysphere and its supporters have been hard at work shilling Rust, which means newer generations of programmers are going to stick with it. If he doesn't do this, once C++ boomers start dying off or retiring, maintaining the codebase is gonna be hard.
I'm only saying this based on the state of open source programs, Ladybird's part of that.Is it really that dire? Maybe I should dust off my own C++ skills. Might be able to make some pretty sums when it comes to maintaining old systems. Although perhaps AI will eat that market.
The guy seems to really feel they need to move away from C++. I honestly don't quite get it but he's in a better position to know than I am.
The reason he gives is parallelization. Perilous in C++ and a lot easier to do in Rust. But the plan is not a full rewrite, just interopHe sees the writing on the wall probably.
Josh Moon cameo when he opens up XitterWake up, February video just dropped
The reason he gives is parallelization. Perilous in C++ and a lot easier to do in Rust. But the plan is not a full rewrite, just interop
not by itself a problembut Rust appears to be a relatively new language
Yes, that happened to some extent with Zig, but Zig will not be the Rust killer. The last event of such sorts was Go to Rust.Doesn't that suggest when the next meme language drops, everything will be rewritten again? Will the Rust cheerleaders gatekeep the Rust rewrites and condemn the newer language?
I predict that Rust will not lose its dominant position as "most loved language" in the next decade because of its deep-rooted cultism and because it actually solves many of the pain points from previous system languages. There are not enough valid criticisms of Rust (as of now) to warrant the creation of a new "superior" language.What I'm asking is if there's a likelihood of another better language to be expected right around the corner? Rust will lose it's cool shine eventually.