3 ms·
I really love Rust's error messages, but I do wish I could get some more arbitrary code inspection prior to the compilation step. For example, sometimes you ma
by lelandbatey 12y ago
I really love Rust's error messages, but I do wish I could get some more arbitrary code inspection prior to the compilation step.
For example, sometimes you may declare something with some odd syntax and Rust effectively say "I was expecting type `A`, but this is type `B`." Frequently, I want to have a little more insight into what's going on, but the inability to maybe write some code that will print out information about something causing a compile error is problematic.
That's the thing about Rust: because the burden of debugging is so shifted to the compilation step, Rust absolutely HAS to have good error messages because that's all you have to work with.
However, I feel this shift in workflow can be overcome with different tooling, and I suspect this is mostly a symptom of being new to the language.
- bjz_ 12y agoYeah, I could imagine some kind of lifetime visualization tool that could be added to an IDE. Would be very useful.
- kvark 12y agoAgreed! I believe this can be accomplished by a third-party library using lint plugins: https://doc.rust-lang.org/book/plugins.html#lint-plugins https://doc.rust-lang.org/book/plugins.html#lint-plugins