Live data from Hacker News

Six years of Go

blog.golang.org

231–240 of 327 posts

Re: Six years of Go

#231

I have a bit of a love-hate relationship going on with Go. On one hand, it addresses many of the pain points I've experienced with other languages. It's easy to build and deploy, reasonably performant, and has a powerful and consistent standard library. On the other… developing in it feels like a total slog. It manages to be simultaneously far too anal and overly forgiving about syntax. Visibility definition using up…

I'm skeptical that "feels like a slog" has much to do with language features you complain about. Better IDE support would go a long way here.

Java can be terribly verbose at times and the culture often makes it worse, but it often doesn't feel like a slog in practice because errors are reported as you type, with quick fixes. Editor plugins for Go will tell you some of the errors, some of the time.

Re: Six years of Go

#232
post #60

Earlier quoted context omitted.

I understand the basics of Go, but do you have any advice on where to start using it for web app development? Any framework that you're using (if one at all)?

I've found the standard library to be more than capable for most CRUD style apps. You can add in simple middleware chaining using a library such as Alice ( https://github.com/justinas/alice ) and for passing around request contexts between them, you can use something like xhandler ( https://github.com/rs/xhandler ). If you want more performant or flexible routing, httprouter ( https://github.com/julienschmidt/httprou…

That's the libraries I use, too. I really wish contexts were built into Go's HTTP library. Without contexts, you have to use global variables to accomplish things like per-request logging and access to configuration data.

Not to mention that since goroutines cannot be forcibly terminated, it's the only way to control the lifetime of a handler (e.g. applying timeouts).

Re: Six years of Go

#233
post #221

Earlier quoted context omitted.

Cobol, Fortran and Lisp are still around.

What language has ever died after having been used by more than a handful of programmers?

Most of the memory safe systems programming languages that were steam rolled by UNIX and C's adoption.

dBase III derivatives.

4GL languages.

Re: Six years of Go

#234

I have a bit of a love-hate relationship going on with Go. On one hand, it addresses many of the pain points I've experienced with other languages. It's easy to build and deploy, reasonably performant, and has a powerful and consistent standard library. On the other… developing in it feels like a total slog. It manages to be simultaneously far too anal and overly forgiving about syntax. Visibility definition using up…

I'm in the same boat. Go's simplicity is initially refreshing, then a huge pain once you find yourself writing the same thing over and over again. A good example is errors being values — which is a great idea. But then you realize every single function needs to be littered 1-10 cases of if err != nil { return nil, err } It's an extremely common pattern. It's tiring to write, over and over. Tiring to refactor, too: If…

Have you seen this blog post by Rob Pike?

https://blog.golang.org/errors-are-values

Re: Six years of Go

#235

Earlier quoted context omitted.

> I am always confused by the push to make every language exactly the same by using the same paradigms and features. More like: some paradigms and features have been proved useful, and experienced programmers ask for them in a language that lacks them. And not indiscriminately, but usually only ask for them if that language is of a certain paradigm / family of languages were those things fit well with (e.g. few ask f…

Please just stop. This is not an objective issue. I for one have spent the last 2 years using Go to build a very performant system which is used by thousands of Bitcoin day traders every day. It's fast, stable, and easy to modify. I have never felt held back by a lack of generics. And yes, I've spent plenty of time using languages that do support generics. It can save you time but I've found it also enables "looser"…

The tired old argument gets trotted out again. If an important, beneficial addition to the language is missing then it's by design and if you don't like it go use something else.

Re: Six years of Go

#236
I've used Go for a couple years but am only just writing my first production system in Go. I think one of the major complaints is that it's use-cases are ambiguous to beginners. Go, IMO, is a systems language and should not be the first thing you pull out when someone says "write a web app".

I think Go has a very limited use case, but it is incredibly good for that use case. If I had to define it right now it would be along the lines of "Highly concurrent micro-services (re: small code bases) that requires decent performance (memory + speed) in a somewhat distributed fashion". Obviously it's not perfect but it's the feeling I've developed recently.

Re: Six years of Go

#237

Earlier quoted context omitted.

Please just stop. This is not an objective issue. I for one have spent the last 2 years using Go to build a very performant system which is used by thousands of Bitcoin day traders every day. It's fast, stable, and easy to modify. I have never felt held back by a lack of generics. And yes, I've spent plenty of time using languages that do support generics. It can save you time but I've found it also enables "looser"…

> Please just stop. This is not an objective issue. When it comes to computer science generics have been an accepted part of PL research for decades. The extra expression power they give and the paradigms they enable are neither controversial, not something that's up to individual tastes to judge. Someone might not like them subjectively, but that's not different than someone not liking closures, or map or any other…

To add to your list C++ guys are still waiting for modules.

Re: Six years of Go

#238

I have a bit of a love-hate relationship going on with Go. On one hand, it addresses many of the pain points I've experienced with other languages. It's easy to build and deploy, reasonably performant, and has a powerful and consistent standard library. On the other… developing in it feels like a total slog. It manages to be simultaneously far too anal and overly forgiving about syntax. Visibility definition using up…

I'm skeptical that "feels like a slog" has much to do with language features you complain about. Better IDE support would go a long way here. Java can be terribly verbose at times and the culture often makes it worse, but it often doesn't feel like a slog in practice because errors are reported as you type, with quick fixes. Editor plugins for Go will tell you some of the errors, some of the time.

I'm not sure about that. I don't tend to use an IDE, but the Go plugins for Sublime seem to do a pretty good job of identifying unidiomatic code and errors even before saving, which is certainly a benefit. Gofmt is fabulous.

The slog seems to be in the frequent feeling of 'why do I have to do this – surely the computer should be doing it for me?'. This is mostly around things like list comprehension, where it feels like using stone-age tools. It sucks, because the development story around e.g. goroutines and channels is so elegant in comparison.

Re: Six years of Go

#239
post #208

Earlier quoted context omitted.

I think even if Larry said "kill it" Go will also survive :-)

On the other had, Google could kill Go tomorrow...

I don't think it would immediately kill it. If Google abandoned Go then given it has only a few unique features it would likely fall in amongst the hundred other second-tier languages that are around today.

It is pretty inarguable that a large part of Go's success has been it's affiliation with Google.

Re: Six years of Go

#240
post #229

Earlier quoted context omitted.

> Go brings some good things to the table, yes. I've seen it's popularity rise in recent years, but it seems to be rising slowly. There are a ton of companies that can be listed for almost every technology. Then name any company using Swift to the level Dropbox uses Go, or retract your claim. Go code looks nothing like C other than general brace styling. I can't decide if you're trolling or just genuinely this ignora…

> What the heck are you talking about > I can't decide if you're trolling or just genuinely this ignorant. Stuff like this breaks the HN guidelines. Please edit it out of your comments when posting here. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newswelcome.html

I've had this message several times, but "What the heck are you talking about" doesn't break any rule whatsoever that I can find. In fact I fail to see how it could be toned down anymore. Are we not permitted to express confusion? Is 'heck' not the lightened American friendly version of 'hell'?

How much more would you like me to blunt what I say in order that it doesn't violate unclear rules?

Post reply on HN