Live data from Hacker News

Why I Program in Go

tech.t9i.in

111–120 of 171 posts

Re: Why I Program in Go

#111
post #18

Earlier quoted context omitted.

My day job involves working with Java and C++ on 10+ year old systems. All of my hobby or side projects are in Go these days with occasional diversions into haskell, ML or various Lisps. So I'll try to impart some understanding of why I would switch to Go from Java or C++. First lets get some things out of the way. Go is fast enough and getting faster very quickly and it definitely has a smaller memory footprint. So…

You need to be commended for defending Go. I don't think the Go developers hide the fact that they mean go as a Systems level programming language. It has higher level features, but the developers don't really mind the fact that Go isn't going to be delivering a whole lot of high level features. Maybe if they come in the form of libraries... Funny thing about Go is that as a compiled language, folks often need to sen…

Go is far more innovative than Dart. Dart is, roughly, "We want to have a Java-clone in the browser". Go actually makes an effort at cleaning up C while adding a structural OO model and building in concurrency.

Re: Why I Program in Go

#113
post #39
post #28

Earlier quoted context omitted.

The only reason you hear less "crazy" Go GC stories is because Go has never been tested as much as the JVM under different application requirements. And if high-profile companies have servers that spend 80% of the time in GC -- well, they must have really neglected their code. That's a result of poor software maintenance, and I doubt any language could help them.

> The only reason you hear less "crazy" Go GC stories is because Go has never been tested as much as the JVM under different application requirements. It is definitely true that the JVM had been thoroughly road tested compared to Go, but your conclusion is unsound. Go was designed to specifically avoid this pitfall.

Sorry, but I am not sure I understand which pitfall you refer to here? Can you elaborate?

Re: Why I Program in Go

#115
post #107

Earlier quoted context omitted.

Remember Go doesn't have objects, it only has structs which are most likely (and should be, but I haven't verified) much lighter weight than the objects you might be used to in Java. As far as the creating tens/hundreds of thousands of structs per second for weeks or months without leaking memory, I'll get back to you on that once my code has been active that long ;)

Usually the in-memory representation is the same for objects and structs, given a garbage collected language.

Ok, I'll have to test it sometime. (if anyone has tested it, let me know)

Re: Why I Program in Go

#116
post #76

Earlier quoted context omitted.

If the biggest gain for the language is a formatting utility then that language is not worth learning.

What is the "biggest" gain a language can have is a matter of taste. Someone who considers the handling of formatting and style to be the "biggest" is likely to be one who values those things highly. That you do not value those things as highly is not particularly profound. It doesn't mean that he is wrong to be excited about that, nor that he is excited about the wrong language, nor even that there is no reason for…

> Someone who considers the handling of formatting and style to be the "biggest" is likely to be one who values those things highly.

Not really. Someone who values those things highly would have written the code as such, instead of relying on a utility to reformat the code.

Re: Why I Program in Go

#117
post #18
post #10

For the life of me I can't understand why anyone would give up the power (in terms of profiling, monitoring and ecosystem, and somewhat better performance, too) of the JVM, for a language marginally more convenient than Java, and arguably less expressive than other JVM languages. The only thing I could think of is a smaller RAM footprint, if you care about that sort of thing. Whenever Go is compared to Java, the argu…

My day job involves working with Java and C++ on 10+ year old systems. All of my hobby or side projects are in Go these days with occasional diversions into haskell, ML or various Lisps. So I'll try to impart some understanding of why I would switch to Go from Java or C++. First lets get some things out of the way. Go is fast enough and getting faster very quickly and it definitely has a smaller memory footprint. So…

> Go makes concurrency easy to get right. I haven't seen any other language get this so right since Erlang.

I don't understand this: You claim you've used Haskell? Haskell beats Go's concurrency out of the water.

Not to mention conciseness...

Re: Why I Program in Go

#118

If anyone is interested in learning go, my site has a compiled list of tutorials and so on http://pineapple.io/resources/tagged/go-language?type=tutori...

The recent five-part tutorial on Go that ran in Dr. Dobb's also has articles worth linking to: http://www.drdobbs.com/240008277

Re: Why I Program in Go

#119
post #18
post #10

For the life of me I can't understand why anyone would give up the power (in terms of profiling, monitoring and ecosystem, and somewhat better performance, too) of the JVM, for a language marginally more convenient than Java, and arguably less expressive than other JVM languages. The only thing I could think of is a smaller RAM footprint, if you care about that sort of thing. Whenever Go is compared to Java, the argu…

My day job involves working with Java and C++ on 10+ year old systems. All of my hobby or side projects are in Go these days with occasional diversions into haskell, ML or various Lisps. So I'll try to impart some understanding of why I would switch to Go from Java or C++. First lets get some things out of the way. Go is fast enough and getting faster very quickly and it definitely has a smaller memory footprint. So…

+1. For me a killer feature is that I easily create executables for lin/mac/win on my machine and don't have any dependencies at all (JVM for example).

Re: Why I Program in Go

#120
post #55
post #27

Earlier quoted context omitted.

Oh, I don't doubt many things can be done much better in other languages than Java, only why stop at Go? Clojure pretty much hits every single one of your requirements, it's more modern and expressive than Go, gets concurrency better, and it's about as slower than Go as Go is slower than Java -- and getting faster. Also, you don't have to give up the monitoring and instrumentation the JVM gives you, as well as the va…

You claim (as I understand): (Java + Clojure) > Go && (Java + Scala) > Go That stance seems to require a low weight on the cost of conceptual and tool-chain overhead. I haven't measured, but I'd guess that the language spec of Go is shorter than the specs of each of those other languages. Edit: Fix spelling of "Clojure".

>I haven't measured, but I'd guess that the language spec of Go is shorter than the specs of each of those other languages.

Doesn't matter, since you'll find huge large holes in libraries, tooling, ecosystem and maturity in Go which can be easily filled in Java+Scala/Clojure, and which nullify any "smaller spec" advantage.

For example there is not one mature and complete web framework in Go. Several for all of Java/Scala/Clojure. There is no good RBDMS support in Go. As good as it gets for the JVM languages. Etc...

Post reply on HN