Live data from Hacker News

Six years of Go

blog.golang.org

171–180 of 327 posts

Re: Six years of Go

#171
post #66
post #51

Started using Go for my latest project (a successor to Evernote). It feels like such a relief, especially having just come out of a node.js project. It's everything I wanted in a (web-app) programming language, and for the first time I can say that a language has actually made my code better. I've never had a codebase this clean before.

I don't mean to be snarky and I'm definitely showing my age here, but isn't that exactly what devs were saying about node.js two years ago?

I didn't. I tried node.js for a couple of months and it was like a breath of fresh air. But later on drowned on constant promises and never called back ;)

Re: Six years of Go

#172

I've been working on a huge monolithic project (for 1 person) for the better part of 2 years now. It is in PHP, but the backend segments ported over to various other languages like python, javascript(nodejs), and now to Go. Having now developed 30 micro-services for Go, which all utilise channels and thus run much faster than any other language I used is just amazing. Not only has my productivity increased majorly, b…

I tried gin, martini and revel and found myself reaching to go back to largely the stdlib after about 6 months of development. The stdlib with a couple convience functions really is quite good.

Me too. I found that most frameworks actually get in a way instead of helping. stdlib FTW

Re: Six years of Go

#173
post #25

Go seems like a fun language that has been sitting on my "look into it list" for a while, can't belive it's already six years old. Since the TensorFlow video post is currently on the frontpage as well...as someone who uses neither C++ nor Go (I can write FizzBuzz level of code in both and read both well enough to get what's going on) I have to wonder how much internal buyin Go really has at Google if the core of such…

It's a project they see as valuable in the future and it would lend itself really well to Go as these calculations are done distributed and yet they picked C++. Go is not Erlang. Go supports green threads (goroutines) and offers CSP-like channels to communicate between threads. However, it does not have a distributed computing story yet (at least, not compared to Erlang, the usual Java frameworks, etc.). For a librar…

> Go supports green threads (goroutines)

As far as I know, goroutines are NOT green threads (threads managed by run-time environment instead of OS). Go produces native code (no VM). And, the goroutines can be multiplexed (depending on implementation) to OS level threads.

Re: Six years of Go

#174
post #60
post #51

Started using Go for my latest project (a successor to Evernote). It feels like such a relief, especially having just come out of a node.js project. It's everything I wanted in a (web-app) programming language, and for the first time I can say that a language has actually made my code better. I've never had a codebase this clean before.

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/httprouter) has a nice feature set.

Maybe it's personal preference, but there's something more satisfying about the modular approach of building up an app using only components I need and understand, rather than starting with a magical feature-laden framework but quickly realizing you don't need half of what it does. I think Go aligns particularly well with this philosophy given its emphasis on composition.

Re: Six years of Go

#175

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"…

>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 established thing. People will always have their preferences.

>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.

That doesn't prove it's not an objective issue, just that a specific use case, in a specific domain, didn't need it.

Or even more precisely, that a specific programmer didn't feel the need "held back" by their lack. Perhaps others would feel "pushed forward" by their presence.

For example, I mentioned Java above, who only got Generics after 10 years. Tons of far bigger Java programs than the one described have been created with Java-without-Generics (from financial services to automobile controllers).

All those projects weren't any "proof" that Java doesn't need Generics (and/or closures). Just that you can do without them too (which is true -- nobody argues that you can't).

Besides, isn't Paul Grahams whole "Blub" concept based on the idea that people using languages without X features have little means to understand their importance (and what they're missing)?

In any case, there are counter-examples to what you write too: several posts from teams that have used Go in production that say they like it but still lament the 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" code, which can be more error-prone. In fact one of my favorite things about Go is how restrictive its type system is. I feel a lot more confident about my code doing only what I think it's doing when using Go.

Generics are not "loose", if anything they're even tighter type-wise than what Go makes you do to overcome their absence. Either you create concrete types for everything, ad nauseum, or you go "loose" and use interface{} and the like, throwing a lot of assurances out of the window.

>If the language is not for you, move on. There are plenty of us who are perfectly happy to write code without generics.

Again, happiness doesn't say much -- that's personal preference and can't be debated.

Java programmers were perfectly happy to write code without Generics and Closures for like 15 years too. Most were even oblivious that those things existed in the PL world at large. Javascript programmers suffered without correct scoping or an import system for 20 years, etc.

Re: Six years of Go

#176
Golang and I have had a mainly wonderful relationship. I think that the performance and concurrency features that it brings to the table are unparalleled. No that Golang is just 6 years old and probably has a few more decades of relevance. Although they need to do something about the compilers as the compiled binaries get more bloated with each release.

Re: Six years of Go

#177

Earlier quoted context omitted.

It's a project they see as valuable in the future and it would lend itself really well to Go as these calculations are done distributed and yet they picked C++. Go is not Erlang. Go supports green threads (goroutines) and offers CSP-like channels to communicate between threads. However, it does not have a distributed computing story yet (at least, not compared to Erlang, the usual Java frameworks, etc.). For a librar…

> Go supports green threads (goroutines) As far as I know, goroutines are NOT green threads (threads managed by run-time environment instead of OS). Go produces native code (no VM). And, the goroutines can be multiplexed (depending on implementation) to OS level threads.

> Go produces native code (no VM)

Green threads can be managed by a runtime library or VM, so no VM doesn't mean no green threads.

> the goroutines can be multiplexed (depending on implementation) to OS level threads.

Being multiplexed onto OS level threads is normal for green threads. Goroutines are "hybrid" (M:N) rather than "user-level" (N:1) threads, but anything other than 1:1 native threading means that you need a runtime or VM managing it, and its a kind of green threads.

Re: Six years of Go

#178
post #125

Earlier quoted context omitted.

I've been having this vision for a while of making a HN-style site where you have to explicitly tag your comment as 'in agreement' or 'in critique'. (And also maybe a slightly hidden away, 'off topic, but that reminds me...' section.) Then you could, for example, browse the ed column of birthday wishes & happy usage stories of Go, say on the left hand side, and then also, scroll through the op-ed right column of diss…

Slashdot had this concept of modifiers, so you could say "+1 Insightful" or "-1 Troll". "+1 Funny" didn't give you any karma.

Ahhh, slashdot, those were the days. :)

My idea is different, though -- the essence is

(1) you'd self-tag -- imagine clicking 'in support' or 'in opposition' to comment.

And then (2), those two different sets of comments would go into different parts of the page.

Maybe a two-column view? Maybe separate pages?

Basically, conversations in a single-section format like HN are constantly getting overrun by criticism. Criticism is interesting and has its place, but it tends to be noiser, and it's disheartening when it's getting in the way of something you want to be excited about.

Re: Six years of Go

#180

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…

CoffeeScript for Go? ;)
Post reply on HN