News for hackers. Stuff that matters.
Re:Go's Tooling Is an Undervalued Technology by whateveracct on Tuesday January 21, 2020 @11:26PM (#22114625)
It's crazy that Haskell has a better debugger (in ghci) than Go, despite Haskell being way less debugger-friendly of a language.
Re:Go's Tooling Is an Undervalued Technology by ithkuil on Wednesday January 22, 2020 @03:36AM (#22115733)
"print/log" based debugging in Haskell is harder and thus there is more pressure to solve the debugging needs with a proper debugger.

I rarely feel the need for a debugger in Go and other procedural languages because I often find it easier to just patch the code with some ad-hoc debugging logic that lets me understand what's going on. I find that usually easier to do rather than figure out how to attach a debugger in the right environment where the issue can be reproduced.

Re:Go's Tooling Is an Undervalued Technology by weavie on Wednesday January 22, 2020 @04:36AM (#22115992)
Print based debugging isnt necessarily harder in Haskell:

https://www.stackage.org/haddock/lts-14.21/base-4.12.0.0/Deb...

Re:Go's Tooling Is an Undervalued Technology by jerf on Wednesday January 22, 2020 @10:01AM (#22118057)
The laziness can make it a bit of a challenge to follow, though. I know trace itself is strict, but that thunk will still be lazy from the environment around it.

Debugging has the same problem too, actually. "Step next" is much more challenging to know what is actually going to be "next" than in other languages. On the plus side (no sarcasm), it's a great way to get a feel for what the laziness really does. I recommend stepping through some non-trivial code of your own with the debugger for any intermediate Haskell programmer, even if it's working perfectly, because it'll actually show you the lazy evaluation order as it happens.

Re:Go's Tooling Is an Undervalued Technology by whateveracct on Wednesday January 22, 2020 @11:05AM (#22118688)
Oh the debugger in Haskell is not used that often. Usually people debug their logic in a repl session.

Print debugging is a little weird in pure code, but it's useful and the same as any other language in any code that does IO.

Re:Go's Tooling Is an Undervalued Technology by blablabla123 on Wednesday January 22, 2020 @11:03AM (#22118670)
I think in highly concurrent apps a debugger might become even more difficult to use since at the end of the day it allows one only to walk linearly through the application.

But in any case, you can use gccgo and gdb.