News for hackers. Stuff that matters.
Re:Why I love Go by diebir on Tuesday December 05, 2017 @06:54PM (#15857336)
"Go is a better* C" It seems like Go is propelled into popularity by people discovering the joy of C/POSIX programming for the first time.

Some of us remember, however, why we left C behind (it does not work beyond a certain degree of complexity). Why would I want to do Web programming in C? We spent years creating better tools for this.

Re:Why I love Go by taneq on Tuesday December 05, 2017 @07:23PM (#15857489)
> Some of us remember, however, why we left C behind (it does not work beyond a certain degree of complexity).

Yeah, but it's pretty good for small simple projects, like the Linux kernel.

Re:Why I love Go by paulddraper on Tuesday December 05, 2017 @11:42PM (#15858583)
The Linux kernel has had innumerable man hours poured into it. (Estimated at $3 billion to recreate.)

It's so large its creator invented a sophisticated VCS to manage it.

There aren't many projects like the Linux kernel.

Re:Why I love Go by aavaas on Tuesday December 05, 2017 @11:11PM (#15858414)
There is a right tool for any job. It is just that C was the right tool (when they started) for writing OS kernels.
Re:Why I love Go by TheDong on Tuesday December 05, 2017 @08:14PM (#15857726)
The kernel is so large and successful despite C, not because of it.

A large number of the common kernel bugs, such as refcounting errors, buffer overruns, messy goto logic (resulting in use-after-frees sometimes) are because the kernel has had to build up poor abstractions due to their language not supporting better abstractions.

Re:Why I love Go by weberc2 on Tuesday December 05, 2017 @11:38PM (#15858567)
Go improves on C substantially, especially for high level programming. GC, interfaces, slices, maps, cross-platform types, expansive standard library, high performance cross platform concurrency, memory safety, runtime type information, etc, etc. So I wouldnt write web programs in C, but Go is one of the best options today, especially if you care about performance, maintainability, or operational complexity.
Re:Why I love Go by Erlich_Bachman on Wednesday December 06, 2017 @04:30AM (#15859775)
Doesn't all that already exist in Java? And have already existed for a while, and thus has a big ecosystem of tools? Why would someone use Go over Java? (Just your opinion, what are the differences?)
Re:Why I love Go by weberc2 on Wednesday December 06, 2017 @09:40AM (#15861319)
Lots of small differences mostly. Go gives you control of memory layout, it has better ergonomics (type inference), simpler tooling, no dependency on IDEs (you can if you want but most use vim or emacs), built in testing, better standard library (production ready HTTP server, JSON, templating, etc), low latency GC out of the box, simpler GC tuning, statically compiled binaries, fast startup times, simpler primitives (e.g., no exceptions or inheritance), implicit interfaces/structural subtyping etc. all while competing with Java for performance.

This is my list of things that Go does better than Java; I don't want to give the impression that Go is perfect--I have lots of criticisms for it (no generics, hacky workarounds for sum types, error handling is often too simple out of the box, no decent REPL, etc), but it lets me be more productive than any language I've used to date.

Re:Why I love Go by Erlich_Bachman on Thursday December 07, 2017 @10:08AM (#15870592)
Thank you, I was looking for just that kind of perspective from someone who uses go and thinks they are getting something better. It's understandable of course that neither of languages are perfect.
Re:Why I love Go by petepete on Wednesday December 06, 2017 @07:00AM (#15860447)
Simplicity of deployment perhaps? Dropping a binary onto a server and having it just work is a huge benefit. Also, memories of Tomcat. shudder.
Re:Why I love Go by wlll on Thursday December 07, 2017 @10:19AM (#15870731)
Go programmer here (operations stuff mostly). Came from Ruby, but have done C, Objective C, Perl and others.

Simplicity of deployment is nice, but the main reason I don't use Java is because it's just painful to write. I had to write some Java just the other day to duplicate a bug a customer bug and it was tortuous.