3 ms·
My personal experience is that doing println/dbg based debugging in python is most times a bad idea and does wast time. Ironically my experience with rust is t
by dathinab 6y ago
My personal experience is that doing println/dbg based debugging in python is most times a bad idea and does wast time.
Ironically my experience with rust is the opposite, i.e. not using println/dbg debugging is most times does wast time. (Except if you do certain thinks with unsafe code).
The difference is I guess that in rust I normally encode much more simple invariant in the type system and as such most times a bug happens I often can pin-down it's rough position by the way it appears (i.e. panics/errors not subtle timing bugs). In turn I just need to get a nice formatted printout of this one or two values. Instead of having to consider all the other ways things might have cone wrong in python which can't happen in rust (through python3's type annotation + linting can help).