Re:Rust, RR, Neovim: A perfect debug combination
by sp0ck on Tuesday April 11, 2023 @06:35AM
(#35523178)
Funny thing is that thanks to rust compiler I never had a need to debug my code :-)
[ Parent
| on HN ]
Re:Rust, RR, Neovim: A perfect debug combination
by carlmr on Tuesday April 11, 2023 @06:51AM
(#35523303)
So true. With proper type driven design you basically don't need a debugger anymore.
But I still find it helpful when you need to check what's wrong in other people's code, since they might not design with types like I do.
Re:Rust, RR, Neovim: A perfect debug combination
by galangalalgol on Tuesday April 11, 2023 @07:04AM
(#35523389)
I find myself using the debugger to explore complex types created by procedural macros. You can use cargo to expand them andnpoke around, or dump the structure to debug if it derives it, but sometimes the debugger seems easier.
Also it can help find why something three crates deep into your dependency tree panicked.
Re:Rust, RR, Neovim: A perfect debug combination
by andsanmar on Tuesday April 11, 2023 @07:24AM
(#35523534)
It may be true that this holds for issues related with out-of-bounds accesses or temporal safety errors, but nothing eludes your application to contain logic bugs. In fact, whenever the application is big enough and you spot a logic error, the debugging burden is still there. Good part is that the debugging utilities for C/C++ are still helpful for Rust programs.
Re:Rust, RR, Neovim: A perfect debug combination
by pyrale on Tuesday April 11, 2023 @08:17AM
(#35524086)
Usually, understanding the type system changes you code/thinking about business logic too. That stems from the habit of thinking about how to check your expected behaviour before implementing it.
Needing a debugger still happens once in a while, but languages/projects that are well adapted to this way of thinking really make it extremely uncommon.