6 ms·
Why exactly is Go so special? For a compiled language it's not very fast and doesn't seem to be making much traction. I think people simply like it because of i
by pipeline_peak 4y ago
Why exactly is Go so special? For a compiled language it's not very fast and doesn't seem to be making much traction. I think people simply like it because of it's Bell Labs heritage and pretty syntax.
- deleted 4y ago[deleted]
- imran-iq 4y agoIn no real order 1. wide range of OS's you can target 2. no dependency on libc, you can build and copy over a binary to a machine and it will work 3. fast compiles 4. amazing stdlib, makes writing no to low dependency code very attainable (imo) there's very little reason to start a new backend project in ruby/python/js when you can just use go and get better performance > doesn't seem to be making much traction Its one of the most in demand languages, at least according to linkedin in my area.
- lghh 4y ago> doesn't seem to be making much traction What do you mean by this? By what metrics and what would qualify as making traction? Many companies use Go and many prominent and widely used open source projects are written in Go. > it's Bell Labs heritage I have never met a person (in person, offline) who has cared about this at all. > pretty syntax One of the most common things you hear as a knock against Go are things that explicitly do not lead to "pretty" syntax, such as its error handling. Overall, your comment confuses me.
- AnimalMuppet 4y ago> > it's Bell Labs heritage > I have never met a person (in person, offline) who has cared about this at all. People care about it because the language has the Bell Labs "feel". They don't care about it the way a dog breeder would care about a dog's ancestry. (And of those who care about the "feel", some view it as a positive, others as a negative...)
- lghh 4y ago> People care about it because the language has the Bell Labs "feel" I'm not attacking, I am honestly asking: What does that mean? That it feels C-like? Or something different? A lot of languages are C-like in syntax, so Go is not exactly unique in that aspect.
- morelisp 4y agoThe belief that you can always improve some code by making it do less. Contrast with e.g. Haskell which is based on the belief you can always improve some code by making it more general, or Rust on the belief you can improve it by making it safer, or Java that you can improve it by breaking it down into smaller chunks. Languages carry aesthetic values. Most are aren't committed to them above literally all else - we all want our code to be somewhat simple and general and safe and isolated etc - but other than the most kitchen sink-y of them (C++, JavaScript) they have priorities among those which show through. (And even in those you can find some, muddled as they are.)
- AnimalMuppet 4y agoThe difference between C and Pascal was a certain pragmatism. Pascal (at least the original) could make it hard or impossible to do certain things. C let you do things, even things that the language designers hadn't thought of. The difference was that C was written by people who were trying to write an OS, and they had to create a language that was able to handle all the odd things involved, like writing directly to hardware. Pascal really didn't want you to do that. I'm not saying that Go lets you talk directly to hardware - I don't know whether it does or not. But I think that Go has the "get out of the programmers way and let them write code" approach more than, say, Haskell, or even Rust. That (plus the C-like syntax) probably is the Bell Labs feel.
- icholy 4y agoI don't think I've ever heard Go described as having "pretty syntax".
- dangoor 4y agoYour comment has been good at generating some discussion around what makes Go special. Since the sibling comments already addressed everything else, I'll talk about this one: > For a compiled language it's not very fast This is essentially true, _but_ a lot of Go users are coming from Python, JavaScript, and maybe Ruby and Go is much faster. Additionally, it comes _close enough_ to Java while typically having a much smaller memory footprint that it really performs quite well in a cloud environment.
- tgv 4y agoI never got the feeling it was slower than Java, but I've only used the standard JVM. In benchmarks, they don't really differ. But the memory footprint is amazing. I've got three servers plus up to 10 test environments running on one small VPS (Virtual Private Server), and everything runs as smooth as can be; memory usage stays below 1GB, leaving enough space for the db server. In a previous job, we had a Java/Tomcat server, and it was filling up memory without doing much. I've inherited a Python server in my current job, and if you don't take care, it slowly grows to 4GB. Go is really a blessing for the back-end.
- dangoor 4y agoI was trying to be charitable given that I haven't seriously used Java in quite a while and have seen some indications that the JVM can be speedier (it _has_ had an incredible amount of optimization work done on it). But, yeah, my experience with Go matches yours. It's really amazingly light on resource usage.
- origin_path 4y agoThe reason the Tomcat filled memory is that for the longest time Java would only run GCs if you were actually running out of memory. The assumption was, if there's RAM there doing nothing then why would you waste CPU and electricity on cleaning up the heap. If you needed that RAM for something else, OK, tell the JVM there's a cap on how much it can use. It'll then do enough GC work to use that much (ish). The problem is, that wasn't really well advertised or understood, so people would see a Java program using lots of memory and assume that this is how much it really required. The elasticity wasn't apparent. These days the JVM can kick off background collections from time to time to reduce memory usage if the app is idle. However it still won't aggressively collect if the app is running because, again, if you haven't capped it then it figures that it's better to serve requests than do lots of "pointless" GC work.
- dimgl 4y ago> For a compiled language it's not very fast …really? Go seems blazing fast to me…
- Jtsummers 4y agoIt's fast at compiling, and it's decent-to-fast in performance. It doesn't have the best performance for a compiled language, though. That was an explicit tradeoff that the Go team made. Getting better performance requires implementing more compiler optimizations, which would slow down compilation. And compiler slowdowns are treated as regressions. Speed has improved though, over the years. [0] 1.17 saw a major performance boost because of the switch from stack-based to register-based ABI for go function calls [1]. The release notes claimed a 5% average improvement, but benhoyt (in that discussion) has benchmarks showing much greater improvement for GoAWK. [0] https://go.dev/doc/faq#Why_doesnt_Go_have_feature_X https://go.dev/doc/faq#Why_doesnt_Go_have_feature_X [1] https://news.ycombinator.com/item?id=28201732 https://news.ycombinator.com/item?id=28201732
- tapirl 4y agooverall balance and flexibility: https://github.com/go101/go101/wiki/The-main-sell-point-of-Go-is-not-simplicity,-but-overall-balance-and-flexibility https://github.com/go101/go101/wiki/The-main-sell-point-of-G...
- lakomen 4y agoIt's a language with a dynamic feel, that isn't dynamic. It's 2 times faster than Java on average with half the resource usage in average.