Live data from Hacker News

I Love Go; I Hate Go

dtrace.org

21–30 of 329 posts

Re: I Love Go; I Hate Go

#23
post #10

The most frustrating thing for me, by far, is that Go won't let you import unused packages. When you are commenting stuff out to debug a program, or adding debug statements and removing them later, it constantly requires you to go back to the top of the file and comment out the unused libraries, only to uncomment them later when you've solved your problem. The fact that there is not a compiler flag to disable this be…

I use an Atom extension called "gofmt" which automatically calls goimports[1] every time I save. So any unused imports will be removed and if I start to use new imports that are in my GOPATH or the standard library then it automatically adds them.

[1] https://godoc.org/golang.org/x/tools/cmd/goimports

Re: I Love Go; I Hate Go

#24

Earlier quoted context omitted.

Probably because the author is a renowned engineer (dtrace, etc)

So the whole voting system is artificially skewed by HN admins?

HN has always had some editorial oversight from admins. That being said I'm not sure why you were initially surprised at this being on the front page with 4 upvotes in 11 minutes. That's a lot by hn standards. Check new, this and 1 other post are the only ones above 4.

Re: I Love Go; I Hate Go

#25

Honest question: How does a post with just 4 points and posted 11 minutes ago get to be on the front page? Even amazing it is number 2 right now.

That's normal.

I'm a nobody (to answer the accusation below) and my submissions of articles that are years old and not recognizably "hot" make it to the front page with only three to five upvotes all the time.

Quick upvotes or comments count for a lot.

Re: I Love Go; I Hate Go

#26
post #10

The most frustrating thing for me, by far, is that Go won't let you import unused packages. When you are commenting stuff out to debug a program, or adding debug statements and removing them later, it constantly requires you to go back to the top of the file and comment out the unused libraries, only to uncomment them later when you've solved your problem. The fact that there is not a compiler flag to disable this be…

I use goimports.

Re: I Love Go; I Hate Go

#28
I don't know, I found debugging with IntelliJ's Go plugin intuitive and well-working. Pretty sure it uses Delve under the hood.

I think strong opinions are helping Go not being "yet another language". So that's good. Like most things, it isn't for everyone.

Re: I Love Go; I Hate Go

#29
post #10

The most frustrating thing for me, by far, is that Go won't let you import unused packages. When you are commenting stuff out to debug a program, or adding debug statements and removing them later, it constantly requires you to go back to the top of the file and comment out the unused libraries, only to uncomment them later when you've solved your problem. The fact that there is not a compiler flag to disable this be…

I used to feel this way. It was my top complaint about the language. But it, and, more importantly, the use requirement for variables, has saved me from bugs repeatedly; I more and more notice the bugs it's protecting me from as I keep coding in the language. I am rapidly coming to the conclusion that this was very, very much the right call.

I get the sense that most Go programmers use "goimports" to work around the annoyance. I have my Emacs configured to use it automatically. I never even think about imports anymore.

Re: I Love Go; I Hate Go

#30
post #10

The most frustrating thing for me, by far, is that Go won't let you import unused packages. When you are commenting stuff out to debug a program, or adding debug statements and removing them later, it constantly requires you to go back to the top of the file and comment out the unused libraries, only to uncomment them later when you've solved your problem. The fact that there is not a compiler flag to disable this be…

i was shocked by that at first too. Then I came to love it. It's sooooo go. Don't import stuff you aren't using. Don't declare a var and just leave it there un-used. When I go back to ruby and commit that crime, I see why golang did what it did. There's something magical about a golang program that will compile without error. It's worthy of checking in to git. And months later, there will be no unsed imports FOR SURE…

What about just really obnoxious compiler warnings that can't be disabled?
Post reply on HN