What do you miss in Go and its ecosystem?

I understand where you are coming from, because it is more of a cleanly code thing than a hard implementation detail. I have to say that static variables appear to be harder to locate simply by scrolling through the code. Globals clutter. Pick and choose your evil.

The bright thing about globals is that they are normally all declared at the top or the bottom (unless they are in another file in the same package :astonished: – harder to locate if the files are not named adequately).

As long as we don’t adopt implicit parameters from Scala, I’m happy. IMHO this is a debugging nightmare.

yep, basically is not but we can admit that golang is a generally purpose language and maybe someone can start a kernel project at a moment… but also can be certain situations where a packed structure is necessary (e.g. in microcontrollers programming).

I’d like a standard lib math for float32

+1 for official GUI toolkit.

1 Like

I miss the ternary operator, but I’m getting over it.

3 Likes

I often wish errors were more than just values. Much of the time, perhaps most of the time, I want to capture the stack trace alongside the error. This is the aspect of exceptions that I miss from other languages, not the control flow.

I can understand why the designers decided not to do this – it’s expensive performance-wise, you definitely wouldn’t want to attach it to io.EOF for instance – but I still find myself wishing I had it when debugging. The third party error packages that can do this for you are helpful, but it’s just not as useful as having it be a core part of the language would be.

Did you ever try putting the result of debug.Stack in the errors? Maybe only in a dev environment controlled via an env flag or something. I haven’t tried this out myself - just a quick idea I had reading your post.

I would encourage you to look at how cockroachdb handles errors, specifically the error utility they use:
https://github.com/cockroachdb/cockroach/blob/master/util/error.go#L38

1 Like

I’ll add a shameless plug for my gopkg.in/stack.v1 package.

Yes, that works only for your own code, though, and not errors generated by others.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.