Live data from Hacker News

Eleven Years of Go

blog.golang.org

81–90 of 170 posts

Re: Eleven Years of Go

#81
post #66

I love Go, but the lack of adoption in business world is a huge problem. Seems to be a niche for infrastructure and utilities. 99% of the jobs I see are Java or Python.

In the business world we have Java with powerful application frameworks and libraries like Spring, which delivers everything that the business needs, and in the other end is Typescript/NodeJS which is extremely cost effective, has reasonable performance and crazy number of open source libraries. Everything in between have smaller share because these two are easily eating most of the market.

Re: Eleven Years of Go

#82
post #80
post #66

I love Go, but the lack of adoption in business world is a huge problem. Seems to be a niche for infrastructure and utilities. 99% of the jobs I see are Java or Python.

My last two jobs were in Fortune 500 and were 100% Go ( backend services / API ).

He is talking about market share. I don't think he meant big companies aren't using it.

Re: Eleven Years of Go

#83
post #61

I'm primarily a C# dev, but I find Go quite interesting. Any recommendations for how I can get started and reap some benefits, given my background?

I'm a full-stack .NET dev that did a brief stint at iStreamPlanet - a streaming media company - where I got my first exposure to Go. I was actually surprised when they hired me with absolutely zero knowledge in Go. That said, I was able to hit the ground running with minimal assistance using the language itself and I found Go to be enjoyable. Don't let the unfamiliar territory intimidate you. "A Tour of Go" was a perfect starting point: https://tour.golang.org/welcome/1

You raised an interesting point in your question though: how do you reap benefits? I did not find a good answer to this. I've yet to see any convincing real-world reason to switch from .NET Core to Go. I thought perhaps it had an edge in the streaming media industry, but I didn't find that argument to hold significant weight either. If you go searching online, you might find some articles that show Go to be more performant using large numbers of threads or doing exclusively mathematical operations, so that might be where you could reap some benefits?

EDIT: I hope what I said about reaping benefits doesn't come off as any sort of fanboy-ism towards a specific language. This is just my personal experience as C# dev. Use the language that's right for you and right for the task.

Re: Eleven Years of Go

#84

I implemented a few services in Go like 5 years ago and they still work. I think some have uptime of 2 years or more. I love that once you get good test coverage, Go programs are extremely stable. I still prefer to do things in Python, but if I need extra stability I go with Go.

Just for fun, I went back to the very first thing I implemented in Go, about 8 years ago†. Compiled and ran flawlessly.

It is SO nice to not have stuff just break out from underneath you.

(Modules wrecked this a little bit; I think it was a mistake to go 1.0 before they worked out a packaging/distribution solution. But what they finally came up w/ looks really nice.)

(†my std "kick the tires problem" -- boggle solver + high-score board finder)

Re: Eleven Years of Go

#85
post #58

Micro was on the frontpage earlier today ( https://news.ycombinator.com/item?id=25044604 ). It's written entirely in Go, and so was its predecessor and everything I've done since 2012. Go is a phenomenal language and I'm not really sure where I'd be without it, my company basically wouldn't exist, I wouldn't be solving the problems I am. Its a phenomenal language and I owe a great deal of gratitude to the Go team for…

>Go is a phenomenal language and I'm not really sure where I'd be without it, my company basically wouldn't exist, I wouldn't be solving the problems I am.

I don't want this to come across as negative but I really don't get this. Can you expand upon this if you don't mind?

What is it about Go specifically that you make claims like that? Realistically couldn't you have done everything you did in Go, in say Java or something else? (I make this as a general comment, I am not aware of the things you have actually written in Go :) )

Re: Eleven Years of Go

#86
post #68

Earlier quoted context omitted.

As one who didn't like either proposal: I'm thrilled that they were shot down. Both worked fine (great, even) in simple cases, but fell apart when needing to add context / wrapping to multiple possible errors. Simple cases are already simple. It's the harder spots that need help.

Can you please share some examples of the harder spots?

Both have at least one shared issue which makes 2+ error wrapping noisy or nasty:

    func whatev() (err error) {
        defer helper(&err, "mightFail context to help debugging", some, vars)
        try(mightFail())
    
        defer helper(&err, "alsoMightFail context to help debugging", some, vars)
        try(alsoMightFail())
    }
if the second call fails, your error has now been wrapped twice.

There are of course ways to deal with this. You can add a "already wrapped" sentinel of some kind (say, a * bool that they check and modify), or use a `helper := once(helperfn)` to do that same kind of thing internally... but that's more verbose. And can't be done generically without reflection (though `func(*error, string, ...interface{})` would be quite common, which might be good enough). Inline handlers shown in many examples are even worse since they can't be composed as easily, so you'd probably end up maintaining a bool var between all handlers. By hand.

They both also require naming your `error` return value, which requires naming all returned values, which has been a depressingly large source of shadowing and not-initialized-value mistakes in my experience. Improperly-initialized values especially, as those tend to cause problems a fair distance from the cause, and sometimes go unnoticed for quite a while.

tl;dr it adds more easily-forgotten boilerplate to non-trivial error handling, and makes it and related code more mistake-prone. I'd rather have `return fmt.Errorf(err, ...)`, it fairly naturally resists growing more complex as your func grows more complex.

Re: Eleven Years of Go

#87
I use Go quite a bit, and I have the exact opposite experience from a lot of these testimonials.

Someone else mentioned go just works, they don't have to fight the tooling, or that they worked on a go program that works five years later (which language does this not apply to). ??? I've had quite a few problems with things like plugins for go deleting unused imports because I am in the habit of saving frequently. I resolved it, but I still had to fight with the tooling. Then there was the whole go mod situation.

Go code is a language that has succeeded in a niche market (It's magical to just spin up a web server that works out of the box with great performance. ) while also handicapping itself so that complex code is too difficult to write. So it doesn't get associated with the problems some other languages have. Java is a good language that people ruined with horrible enterprise culture.

I don't even really think that go is that painless to learn. The small size of average projects has led to some dire fault lines. The biggest one for me is that it's structural typing for interfaces isn't explicit. Often times I'll read some code that uses an interface, and I'll have a real hard time mentally mapping what uses that interface and how to write code. 90% of the time this isn't an issue because the projects are small enough that I can just keep the whole thing in my head, and I can make educated guesses, or I only need to remember a handful of common cases. This doesn't scale well. Yea, I know there's plugins for these things - and I use them, but I am not a fan of tying development to non-standalone tools.

Anyways, rant aside, looking forward to another 11 years of go.

Re: Eleven Years of Go

#88
post #61

I'm primarily a C# dev, but I find Go quite interesting. Any recommendations for how I can get started and reap some benefits, given my background?

I'm a full-stack .NET dev that did a brief stint at iStreamPlanet - a streaming media company - where I got my first exposure to Go. I was actually surprised when they hired me with absolutely zero knowledge in Go. That said, I was able to hit the ground running with minimal assistance using the language itself and I found Go to be enjoyable. Don't let the unfamiliar territory intimidate you. "A Tour of Go" was a per…

Appreciate the input from someone who has gone .NET -> Go!

I wasn't sure if there were any obvious benefits, but from looking at various Go codebases recently, they usually seem so succinct by comparison to the typical C# codebase I see - I love C#, but that has piqued my interest. Also, I don't try new languages often, so might be interesting just to have a go (yes, pun intended :)

Re: Eleven Years of Go

#89
post #61

I'm primarily a C# dev, but I find Go quite interesting. Any recommendations for how I can get started and reap some benefits, given my background?

I got started with the Go tour: https://tour.golang.org You'll get a feel for the language constructs. Once you're ready to graduate to tinkering with your own stuff, then go install Go: https://golang.org/doc/install Some noted differences from C# (my C# knowledge is 5-10 years out of date, mind you): * Go is a much simpler language; it lacks classes, inheritance, generics, exceptions, etc--you can be productive in…

Oof, sorry for the formatting. Missed the edit window. One last characterization: Go is like C with a GC, package management(and other sane tooling), and many other rough edges removed.

Re: Eleven Years of Go

#90
post #58

Micro was on the frontpage earlier today ( https://news.ycombinator.com/item?id=25044604 ). It's written entirely in Go, and so was its predecessor and everything I've done since 2012. Go is a phenomenal language and I'm not really sure where I'd be without it, my company basically wouldn't exist, I wouldn't be solving the problems I am. Its a phenomenal language and I owe a great deal of gratitude to the Go team for…

>Go is a phenomenal language and I'm not really sure where I'd be without it, my company basically wouldn't exist, I wouldn't be solving the problems I am. I don't want this to come across as negative but I really don't get this. Can you expand upon this if you don't mind? What is it about Go specifically that you make claims like that? Realistically couldn't you have done everything you did in Go, in say Java or som…

No. Without the existence of Go, I would not have gotten my last job, we would not have built the platform we did, I would not have seen the opportunity and ability to build such a business. It's all a chain of events that occur because a technology exists that enables it. If Go didn't exist my path would be very different.
Post reply on HN