Live data from Hacker News

Go is my hammer, and everything is a nail

maragu.dev

41–50 of 816 posts

Re: Go is my hammer, and everything is a nail

#41
post #21

If all you know is a Hammer… I was searching for reasons why to use the Go-Hammer when there are comparable ones such as Java, C#, etc. but the article left me wanting. It strikes me that Go is riding the peak of hype languages, succeeding Rust and Node.js (which are all good pieces of technology and absolutely have their merit). And like with most hype driven decisions there is little (self) awareness of context and…

I wasn't aiming for that. My point is more: I know Go already, it's good enough for my purposes, so I'm using that as my hammer. I could just as well have been Java or C# I learned eight years ago and used that for everything. :)

Just looking at Go after having experience with Erlang and Crystal, does it still have a narrow-minded view of what features language won't support?

Like I remember there was a whole drama about generics, errors being simple strings and always returned without being able to raise them, is this attitude still there or have things changed?

Re: Go is my hammer, and everything is a nail

#43

Earlier quoted context omitted.

> I just don't understand why you wouldn't choose something faster and more expressive. The answer to this is as simple as genuinely asking, answering, and understanding why you don't do all of your development in assembly language.

I didn't mean faster in terms of execution time but in terms of development time. And more expressive is doing more with less code. We're at complete opposite ends of the spectrum here -- how that indicated to you that I meant assembly...

Go might not be the most concise or expressive language, but it's quite fast in terms of development time, IMO/IME.

Re: Go is my hammer, and everything is a nail

#44
post #19

Earlier quoted context omitted.

Protobuf is not the default in Go the default is REST. What tools are a mess? Go tooling ( runtime ) and IDE integration is very good. Go is not a hyped language, we're past that cycle, some critical and widely used software are built in Go, millions of people rely on it.

Bazel. While not Go-specific, it's the extremely popular option in the space and I've seen it bring many-a-seasoned wizard to their knees in tears. Also managing your go dependencies if you cargo-cult other Google behaviors like monorepos tends to be painful. Basically just cargo-culting Google behavior == pain. Choosing golang can often be part of this behavior pattern.

Bazel is not a Go default either. You can get very far just by using the default Go Modules, and this is much more common than repos using Bazel.

Throw some Makefiles and shell scripts in the mix, if that's your thing, and that's perfectly fine.

Re: Go is my hammer, and everything is a nail

#45

You could have written the same article about C#.

Indeed, this article would read just as well after applying s/\bgo\b/C#/ig, or should I say:

    Regex.Replace(articleText, @"\bgo\b", "C#", RegexOptions.IgnoreCase);
Or indeed most general purpose languages, which the article itself mentions.

Re: Go is my hammer, and everything is a nail

#46

If all you know is a Hammer… I was searching for reasons why to use the Go-Hammer when there are comparable ones such as Java, C#, etc. but the article left me wanting. It strikes me that Go is riding the peak of hype languages, succeeding Rust and Node.js (which are all good pieces of technology and absolutely have their merit). And like with most hype driven decisions there is little (self) awareness of context and…

Go is getting hype because TS is old news. And people got tired of being nerd sniped into trying Rust and being let down. It’s okay, hype cycles are good since it shakes up mainstream opinion and gets people to try stuff. Like a new trendy food. I don’t feel much in the ways about it. How do you feel about Go outside of the hype cycle?

How is Go not older news than TS?

Re: Go is my hammer, and everything is a nail

#47
The author lists multiple reasons for this, but for me the biggest one is the first one: Go is good for almost everything.

I have extremely good productivity when using Go. Once your project exceeds 100 lines it is usually even better than python. And yes, I am aware that Rustians did a survey where Rust was crowned as the most efficient language but in my reality (which may differ from yours) Go is simply the best tool for most tasks.

Why is that? Well, for me there are 3 reasosns:

1. The language is extremely simple. If you know 20% of C you are already a Go expert.

2. The core libraries are extremly well thought.

3. Batteries are included. The toolchain and the core libraries alone can do 90% of what most people will ever need.

When people argue about the validity of these claims, I simply point them to this talk https://go.dev/talks/2012/concurrency.slide#42

Re: Go is my hammer, and everything is a nail

#48

Earlier quoted context omitted.

> I just don't understand why you wouldn't choose something faster and more expressive. The answer to this is as simple as genuinely asking, answering, and understanding why you don't do all of your development in assembly language.

I didn't mean faster in terms of execution time but in terms of development time. And more expressive is doing more with less code. We're at complete opposite ends of the spectrum here -- how that indicated to you that I meant assembly...

I'm genuinely curious which language you see as having a better development time. I don't mean that as arguing, I'm actually curious. I don't know much about Go but I just began learning it 2 days ago. I'm already 50% of the way done through a really nice TUI app, and I haven't even touched the docs.

To me at least, it feels extremely productive so far.

Re: Go is my hammer, and everything is a nail

#49
Go is not a single tool. It's a vast set of tools. Using mostly Go is kind of like using mostly Milwaukee power tools. Then, when you need a tape measure or a level or a tool bag, if you're reasonable you can use another brand, where it makes sense.

You still should always try to use the right tool for the job. Doesn't mean it has to be the absolute best tool or such a thing exists, the best tools are often the ones you have ready at hand and know or can learn how to use.

Re: Go is my hammer, and everything is a nail

#50

Earlier quoted context omitted.

Go is getting hype because TS is old news. And people got tired of being nerd sniped into trying Rust and being let down. It’s okay, hype cycles are good since it shakes up mainstream opinion and gets people to try stuff. Like a new trendy food. I don’t feel much in the ways about it. How do you feel about Go outside of the hype cycle?

How is Go not older news than TS?

I think hype is more about trends than it is about age. PHP is going through a bit of a hype phase right now, for instance, mostly because of Laravel and the fact that the language has been silently improving a lot since the wordpress days, and developers are just now starting to realize it.
Post reply on HN