Live data from Hacker News

Go: Ten years and climbing

commandcenter.blogspot.com

81–90 of 193 posts

Re: Go: Ten years and climbing

#81
post #53

Having dealt with enough spaghetti code over the years (just a few of industry experience, and some more years of academia), I understand what Go's strengths are. It's an opinionated language that stops users from being too clever or writing code that's too complex. That said, I've always hated the trends that have brought Golang into popularity. The engineers I've felt who could benefit from Golang the most could al…

> As a simple language to wire pieces together, Golang is fine, but it really doesn't give you the tools (imo) to be productive for anything more complex than simple apps. It's a great alternative to JS (again imo), but not something I'd like to write. How do you address its popularity in the field of cloud computing then (which I presume you would agree is pretty complex)? This was mentioned in ample detail by Rob i…

The language that appeals to the masses with low barrier to entry in a niche always wins the popularity contest in that domain. I attribute it to herd mentality; assuming skill has a standard distribution, the average developer herd gets a massive head start.

You can see the idiot friendly language eclipse in popularity in other domains too even though "better" alternatives exist:

- elegant general purpose: python over ruby

- web: php over python/rails

- SQL databases: MySQL over Postgres

- NoSQL: MongoDB over CouchDB/Postgres

Go's just the first mass appeal language in the concurrency performance domain and it just opened the door to a lot of developers who before wouldn't dare play in the space.

Re: Go: Ten years and climbing

#82

Having dealt with enough spaghetti code over the years (just a few of industry experience, and some more years of academia), I understand what Go's strengths are. It's an opinionated language that stops users from being too clever or writing code that's too complex. That said, I've always hated the trends that have brought Golang into popularity. The engineers I've felt who could benefit from Golang the most could al…

What about tools that statically analyze your code and allow you to be more productive? It may be possible to build more sophisticated and useful tools if the language is simple.

You talk about giving the developer tools, but those tools can be augmentations on top of the basic building block that is the language. That way, anyone can build tools for their needs, without complicating the lives of others. No need to build all the tools into the language, that's very constraining.

Re: Go: Ten years and climbing

#83

Earlier quoted context omitted.

I worry that a lot of developers who have been using languages like Java or C# see Go and immediately feel the need to point out that Go doesn't support language features that they've come to rely on, and so they see that as a weakness or a flaw. With Go, you're getting a lot of high-level language features like anonymous functions, while also gaining the control that you're not able to get in higher level languages…

>I will say though, dependency management in Go is hell. I wish Go had something like Cargo. This is the number one thing that has kept me from going full on Go. The killer feature of Node was NPM, not Javascript. Unless Golang comes up with something comparable it will forever remain niche.

(NOTE: I am not a gopher) I thought godep was that? It's marked as suitable for production now, and I think official as of their next release.

https://github.com/golang/dep

Re: Go: Ten years and climbing

#84
post #26

I appreciate the ruthless design choices behind Go. Crafting a language so there are as few ways as possible, and preferably one, to solve a problem must be beautiful at a large scale organization. In my experience java codebases in big companies are nightmare factories because of the freedom you get from more similar languages. The Go dream of having a single decent solution to a problem instead of 20 that range fro…

>because of the freedom you get from more similar languages. Is this lack of freedom a good thing?

I can see it being a good thing in many organizations. I've worked in organizations with very sharp people who did not care to limit one another, allowing a smorgasbord of languages, frameworks, idioms, etc. Watching them smartly tackle the wide variety of idiosyncrasies that came with each language and framework was frustrating because, while they solved a great many problems, delivering robust working software was not one of them. I don't think everyone would have that problem. But I'd wager a great many would (do).

Re: Go: Ten years and climbing

#85
post #42

I love Go for the concurrency and awesome cross platform support, but my biggest complaint about Go is still the forced GOPATH. I know this is super nitpicky, but I like to keep work and personal code completely separate and changing GOPATHs is very frustrating. With the introduction of `vendor` and software like glide and dep tool, you no longer have to store your sources in `$GOPATH/src`. Since dep/glide are also r…

Completely separate = dont allow dependencies between or one is base and second auguments and depends on base or dont allow changes to one of them?

How would your ideal system look like? What is your use case?

Sidenote if it helps there is a default gopath location if its not defined: https://golang.org/doc/go1.8#gopath

Re: Go: Ten years and climbing

#86

Earlier quoted context omitted.

>I will say though, dependency management in Go is hell. I wish Go had something like Cargo. This is the number one thing that has kept me from going full on Go. The killer feature of Node was NPM, not Javascript. Unless Golang comes up with something comparable it will forever remain niche.

(NOTE: I am not a gopher) I thought godep was that? It's marked as suitable for production now, and I think official as of their next release. https://github.com/golang/dep

It is certainly a fantastic solution, and I definitely appreciate the work that Sam Boyer and the `dep` contributors do.

There's a lot of "gotya"s with using dep though.

One that gets me a lot is the fact that I like to commit my vendor folder, just for faster CI.

So if I committed my vendor folder with a copy of "k8s.io/client-go", and then in a different project I imported a package from my vendored project, it would never compile until I removed my local copy of that "vendor" folder, since it's looking for that specific dependency ("my-project/vendor/k8s.io/client-go").

Not sure if I explained that super well.

Re: Go: Ten years and climbing

#88

I evaluated Go a few months ago for a web project, but it seemed as if there was a lot of manual work involved in mapping objects in and out of a MySQL database and in and out of JSON (basically, 50% of my day-to-day back end work). It just seemed too arduous. The second thing that bothered me was that an edge-case bug in one of my HTTP handlers paniced the app. If that had happened in production while under load, ma…

> - What is the best way to map objects to/from JSON? - What is the best way to map objects to/from a database?

I'd recommend using the JSON to generate your struct definitions, in a schema-like fashion. I wrote a tool to automate that process: https://github.com/ChimeraCoder/gojson

I use this as a step in the build system for the projects, which ensures that the definitions stay in sync with the API clients/servers themselves.

Re: Go: Ten years and climbing

#90

Earlier quoted context omitted.

>I will say though, dependency management in Go is hell. I wish Go had something like Cargo. This is the number one thing that has kept me from going full on Go. The killer feature of Node was NPM, not Javascript. Unless Golang comes up with something comparable it will forever remain niche.

(NOTE: I am not a gopher) I thought godep was that? It's marked as suitable for production now, and I think official as of their next release. https://github.com/golang/dep

>(NOTE: I am not a gopher) I thought godep was that? It's marked as suitable for production now, and I think official as of their next release.

I didn't realize they were working on solving this, that's fantastic. Hopefully it can gain traction.

Post reply on HN