Re:Rust in 2017: what we achieved
by Scarbutt on Thursday December 21, 2017 @04:07PM
(#15982757)
Is a debugger really a hard requirement for learning a language?
[ Parent
| on HN ]
Learning no. Using, I think yes.
Re:Rust in 2017: what we achieved
by burntsushi on Thursday December 21, 2017 @04:44PM
(#15983075)
For what it's worth, while I would regularly use a debugger for C code, I've never once tried or had the urge to use a debugger on Rust code. (I've been using Rust for almost 4 years.)
I usually don’t use the debugger to debug language features, but rather my own logic. It’s very useful to step and inspect parameters when you can’t really see your own logic errors.
I have to say that my own experience over the last two years matches burntsusih's pretty close.
In the case of logic stuff Tagged Union/Enum types help me force logic at compile time. If I've got a particularly intractable logic problem a good coverage of unit tests works well to flush out any bugs and give me confidence when it comes to refactoring.
There's been a handful of times that I've wanted to reach for the debugger but a couple inspect()/println!() calls did the trick in those cases.