Live data from Hacker News

My Opinionated Guide To Go

blog.hackingthought.com

1–10 of 73 posts

Re: My Opinionated Guide To Go

#2
I just wish Go would let me compile and run with a flag -allowing- unused imports. I find myself wasting a lot of time hunting down unused imports or variables and commenting them out.

Maybe that'll be a non-issue the more I use Go, but so far it's a bit of a time waster.

Re: My Opinionated Guide To Go

#3

I just wish Go would let me compile and run with a flag -allowing- unused imports. I find myself wasting a lot of time hunting down unused imports or variables and commenting them out. Maybe that'll be a non-issue the more I use Go, but so far it's a bit of a time waster.

https://github.com/bradfitz/goimports

Re: My Opinionated Guide To Go

#4

I just wish Go would let me compile and run with a flag -allowing- unused imports. I find myself wasting a lot of time hunting down unused imports or variables and commenting them out. Maybe that'll be a non-issue the more I use Go, but so far it's a bit of a time waster.

Maybe Go is trying to tell you that the "move fast and break things" methodology is not how it should be used?

Re: My Opinionated Guide To Go

#5
Why does this article only compare Go with interpreted languages at the top? Go is a compiled language; wouldn't it be more fair to compare it with other languages that can be compiled, like C++, Rust, Haskell, or Lisp/Scheme?

I mention this because the article acts as if getting rid of abstraction layers between the OS and the code is a new idea. No, that's how all compiled languages are... that's the point of compiled languages. I suppose Go's most common use case lines it up against a bunch of slow interpreted languages, but really there's no reason except good libraries that you can't use the other compiled languages I mentioned for web apps.

Re: My Opinionated Guide To Go

#6

I just wish Go would let me compile and run with a flag -allowing- unused imports. I find myself wasting a lot of time hunting down unused imports or variables and commenting them out. Maybe that'll be a non-issue the more I use Go, but so far it's a bit of a time waster.

Maybe Go is trying to tell you that the "move fast and break things" methodology is not how it should be used?

I know right? I do feel a warm fuzzy feeling when things compile and I generally feel much safer than when building things in Ruby.

Re: My Opinionated Guide To Go

#7
post #3

I just wish Go would let me compile and run with a flag -allowing- unused imports. I find myself wasting a lot of time hunting down unused imports or variables and commenting them out. Maybe that'll be a non-issue the more I use Go, but so far it's a bit of a time waster.

https://github.com/bradfitz/goimports

Exactly. I have vim handle it for me every time I save. No problemo.

Re: My Opinionated Guide To Go

#8
Have noted this 'opinionated' trend going for quite a while, so this comment isn't about this article in particular, but can someone break down why an opinionated guide to something technical would be preferable to an impartial one? The only thing it seems to imply is that bias adds value in its own right.

Re: My Opinionated Guide To Go

#9
post #5

Why does this article only compare Go with interpreted languages at the top? Go is a compiled language; wouldn't it be more fair to compare it with other languages that can be compiled, like C++, Rust, Haskell, or Lisp/Scheme? I mention this because the article acts as if getting rid of abstraction layers between the OS and the code is a new idea. No, that's how all compiled languages are... that's the point of compi…

Well to be fair it does mention Java (though the deployment model expressed is, shall we say, Byzantine).

Re: My Opinionated Guide To Go

#10
Not entirely on-topic, but the mention of the various language "stacks" at the beginning of the article reminded me of something I've been wondering.

Why does the de facto standard for web apps in Go-land seem to be using the built-in HTTP server provided by net/http, or otherwise having the program server as its own HTTP server?

Most other languages seem to have converged on FastCGI or some similar model ({W,P}SGI, Rack, etc.).

It irks me a bit because I don't understand why you'd want to do it this way; it seems preferable to have a dedicated HTTP server in pretty much every way I can think of.

Does anyone have any insight there?

Post reply on HN