3 ms·
Because we don't want to export internal fields of structures in our API or we need to perform initialization logic before considering the structure ready for u
by meddlepal 7y ago
Because we don't want to export internal fields of structures in our API or we need to perform initialization logic before considering the structure ready for use?
That's a pretty common use case but ignore that for a moment and just distill the problem down to it is possible to have null pointer issues in Go code.
Another example eith sufficient use of goroutines and channels it gets really tricky to debug something when a receiving channel blocks because something isn't sending.
There's plenty more. I don't find Go any simpler to debug than Java, Kotlin, Rust, or Python and in many cases it is significantly more difficult because you're constantly fighting the type system or working through huge amounts of boilerplate.