4 ms·
I don't usually use debuggers in functional programming languages. Since it's mostly expressions I usually use REPLs. But for imperative languages like Go, a f
by namelosw 7y ago
I don't usually use debuggers in functional programming languages. Since it's mostly expressions I usually use REPLs.
But for imperative languages like Go, a fast and good debugger can boost up productivity a lot if properly used, it's basically a REPL for imperative languages - since imperative languages mess with the ordering and the environments much more than functional languages.
Instead of inferring how to code would be executed, you would debug at reasonable places, know how it executes and play with it directly with some expressions. It's more about the feedback speed.
Only using print it's not sufficient because there are a lot of data structures that are too large to serialize. Or like functions that are not serializable at all, you have to reference it in the debugger or it doesn't really help.