News for hackers. Stuff that matters.
Re:I stopped everything and started writing C again by Ygg2 on Wednesday March 12, 2025 @07:00AM (#43341918)
> Rust is a much more complex language than C

Feature wise, yes. C forces you to keep a lot of irreducible complexity in your head.

> Rust has a much, much slower compiler than pretty much any language out there

True. But it doesn't matter much in my opinion. A decent PC should be able to grind any Rust project in few seconds.

> Rust applications are sometimes

Sometimes is a weasel word. C is sometimes slower than Java.

> Rust takes most people far longer to "feel" productive

C takes me more time to feel productive. I have to write code, then unit test, then property tests, then run valgrind, check ubsan is on. Make more tests. Do property testing, then fuzz testing.

Or I can write same stuff in Rust and run tests. Run miri and bigger test suite if I'm using unsafe. Maybe fuzz test.

Re:I stopped everything and started writing C again by TingPing on Wednesday March 12, 2025 @07:14AM (#43342005)
Real projects get into the millions of lines of code, Rust will not scale to compile that quickly.
Re:I stopped everything and started writing C again by IshKebab on Wednesday March 12, 2025 @07:35AM (#43342139)
Not quickly, no. But neither does C++ (how long does it take to compile Clang?) and people manage fine.

Faster would obviously be better, but it's not big enough of a deal to cancel out all the advantages compared to C.

Re:I stopped everything and started writing C again by imtringued on Wednesday March 12, 2025 @08:15AM (#43342419)
I remember a project that used boost for very few things, but it included a single boost header in almost every file. That one boost header absolutely inflated the build times to insane levels.
Re:I stopped everything and started writing C again by accelbred on Wednesday March 12, 2025 @05:46PM (#43347985)
I once moved a C++ project to C, and compile times went from 15 minutes to 5 seconds. It was a huge productivity boost. LLVM being slow to compile is also one of the reasons the Zig folk are looking to make it an optional dependency.
Re:I stopped everything and started writing C again by __d on Wednesday March 12, 2025 @07:33AM (#43342127)
> C takes me more time to feel productive. I have to write code, then unit test, then property tests, then run valgrind, check ubsan is on. Make more tests. Do property testing, then fuzz testing.

So … make && make check ?

Re:I stopped everything and started writing C again by tcfhgj on Wednesday March 12, 2025 @07:50AM (#43342227)
"How to install and use "make" in Windows?"

https://stackoverflow.com/questions/32127524/how-to-install-...

Re:I stopped everything and started writing C again by __d on Thursday March 13, 2025 @04:59AM (#43351443)
If you can figure out installing a C compiler, surely you can figure out installing make?
Re:I stopped everything and started writing C again by thih9 on Wednesday March 12, 2025 @07:33AM (#43342121)
Good for you. Like the grandparent commenter said, for others these tradeoffs might be important. E.g.:

> I am disappointed with how poorly Rust's build scales, even with the incremental test-utf-8 benchmark which shouldn't be affected that much by adding unrelated files. (...)

> I decided to not port the rest of quick-lint-js to Rust. But... if build times improve significantly, I will change my mind!

https://quick-lint-js.com/blog/cpp-vs-rust-build-times/

Re:I stopped everything and started writing C again by Ygg2 on Wednesday March 12, 2025 @08:11AM (#43342389)
> Good for you. > https://quick-lint-js.com/blog/cpp-vs-rust-build-times/

Look you're picking a memory unsafe language versus a safe one. Whatever meager gains you save on compilation times (and the link shows the difference is meager if you aren't on a MacOS, which I'm not) will be obliterated by losses in figuring out which UB nasal demon was accidentally released.

This is like that argument that dynamic types save time, because you can catch error in tests. But then have to write more tests to compensate, so you lose time overall.

Re:I stopped everything and started writing C again by kelnos on Wednesday March 12, 2025 @02:23PM (#43346193)
> A decent PC should be able to grind any Rust project in few seconds.

That is demonstrably false, unless your definition of "decent PC" is something that costs $4000.

I love Rust, but saying misleading (at best) things about build times is not a way to evangelize.

Re:I stopped everything and started writing C again by Ygg2 on Wednesday March 12, 2025 @10:34PM (#43349866)
> That is demonstrably false, unless your definition of "decent PC" is something that costs $4000.

How is it demonstrably false? I'm on 5900x and Rust compilation speed was never an issue for me.

More like $1500. $500 for 9950x. $200 for Mobo, $200 for memory and $100 for 1Tb ssd and power supply for $100. Coolers and case by desire. GPU optional.

Only way to get to $4000 in a PC is you are buying fancy components or you bought latest xx90 card.

Re:I stopped everything and started writing C again by anymouse123456 on Wednesday March 12, 2025 @02:47PM (#43346432)
This is a fair response! Thank you. We can disagree on these things and I'd still gladly buy you a beer.
Re:I stopped everything and started writing C again by uecker on Wednesday March 12, 2025 @02:59PM (#43346544)
I don't feel like I need to keep a lot of complexity in my head for C. But one needs to have a concept of how to organize things. I guess Rust forces this onto you.
Re:I stopped everything and started writing C again by astrange on Wednesday March 12, 2025 @08:12PM (#43349097)
> C takes me more time to feel productive. I have to write code, then unit test, then property tests, then run valgrind, check ubsan is on. Make more tests. Do property testing, then fuzz testing.

Have you tried looking around and noticing nobody else does that and it's, like, fine?