News for hackers. Stuff that matters.
Re:Common Rust Lifetime Misconceptions by naasking on Saturday May 23, 2020 @07:58AM (#23282216)
> If fighting with the compiler is necessary for learning

I don't think "fighting the compiler" is a useful concept. No matter what language you're learning, you have to learn both the language's syntax and semantics.

If your program barfs up an error at runtime because you made a semantic error the language forbids, that's no better than barfing up an error at compile time because you made semantic error the language forbids.

So it's both more accurate and more precise to say that a language's semantics might be complicated or subtle, but the compilation step is orthogonal to the actual problem you're talking about.

Re:Common Rust Lifetime Misconceptions by kd5bjo on Saturday May 23, 2020 @08:18AM (#23282310)
The difference in when the error is flagged is a large difference, though. Usually, runtime semantic errors won’t be flagged until the program tries to actually perform some nonconforming action. That lets the programmer work on unrelated issues by simply not exercising the defective path.

Compile-time errors, on the other hand, ensure that the entire program meets some baseline of correctness before any of it is run. Neither is necessarily better or worse than the other, but they are categorically different things that have their own effects on the experience of writing programs.