News for hackers. Stuff that matters.
Re:I stopped everything and started writing C again by baq on Wednesday March 12, 2025 @06:41AM (#43341755)
Rust has three major issues:

- compile times

- compile times

- compile times

Not a problem for small utilities, but once you start pulling dependencies... pain is felt.

Re:I stopped everything and started writing C again by anta40 on Wednesday March 12, 2025 @06:59AM (#43341899)
Long compile time isn't a new issue for language with advanced features. Before Rust, it was Haskell. And before Haskell, it was C++.

And implementation wise, probably there's something to do with LLVM.

Re:I stopped everything and started writing C again by gpderetta on Wednesday March 12, 2025 @08:05AM (#43342334)
Compile time is also my top three major issues with C++, in a list that also includes memory safety.
Re:I stopped everything and started writing C again by pjmlp on Wednesday March 12, 2025 @01:53PM (#43345889)
It is when the root cause is tooling, not language features.

You don't need to wait for long compile times in Haskell if you don't want to, there are interpreters and REPLs available as well.

You don't need to wait for long compile times in C++ if you don't want to, most folks use binary libraries, not every project is compiled from scratch, there are incremental compilers and linkers, REPLs like ROOT, managed versions with JIT like C++/CLI, and if using modern tooling like Visual C++ or Live++, hot code reloading.

Re:I stopped everything and started writing C again by codr7 on Wednesday March 12, 2025 @09:19AM (#43342948)
Compared to C I'd say the biggest issue is complexity, of which compile time is a consequence.
Re:I stopped everything and started writing C again by baq on Wednesday March 12, 2025 @09:25AM (#43343003)
The C standard makes provisions for compiler implementers which absolve them from responsibility of ignoring the complexity of the C language. Since most people never actually learn all the undefined behavior specified in the standard and compilers allow it, it might seem the language is simpler, but it's actually only compilers which are simpler.

You can argue that Rust generics are a trivial example of increased complexity vs the C language and I'd kinda agree: except the language would be cumbersome to use without them but with all the undefined C behavior defined. Complexity can't disappear, it can be moved around.

Re:I stopped everything and started writing C again by codr7 on Wednesday March 12, 2025 @09:53AM (#43343272)
True, if C wanted to be Rust it would be just as complicated.

But who cares?

The fact that C chooses not to nail everything down makes it a simpler and more flexible language, which is why it's sometimes preferred.

Re:I stopped everything and started writing C again by Dylan16807 on Wednesday March 12, 2025 @02:01PM (#43345964)
Undefined behavior does not make things simpler.
Re:I stopped everything and started writing C again by codr7 on Wednesday March 12, 2025 @04:09PM (#43347184)
It does too make the language simpler, and there's no way to rustle your way around that fact.
Re:I stopped everything and started writing C again by Dylan16807 on Wednesday March 12, 2025 @05:19PM (#43347791)
It makes the document describing C simpler.

It makes the C semantics you are coding against more complex. Lots of unlisted or handwaved things in the spec become problems you need to keep in mind far more often than you would with better definitions.

Re:I stopped everything and started writing C again by kelnos on Wednesday March 12, 2025 @02:32PM (#43346282)
Long compile times with Rust don't really bother me that much. If it's someone else's program that I just want to build and run for myself, the one-time hit of building it isn't a big deal. I can be patient.

If it's something I'm actively developing, the compile is incremental, so it doesn't take that long.

What does often take longer than I'd like is linking. I need to look into those tricks where you build all the infrequently-changing bits (like third-party dependent crates) into a shared library, and then linking is very quick. For debug builds, this could speed up my development cycle quite a bit.