6 ms·
"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,
by diebir 9y ago
"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.
- taneq 9y ago> 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.
- TheDong 9y agoThe 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.
- aavaas 9y agoThere is a right tool for any job. It is just that C was the right tool (when they started) for writing OS kernels.
- paulddraper 9y agoThe 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.
- boltzmann_brain 9y ago> we left C behind (it does not work beyond a certain degree of complexity) I hope this is either a ruse or you're really inexperienced.
- weberc2 9y agoGo 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.
- Erlich_Bachman 9y agoDoesn'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?)
- petepete 9y agoSimplicity of deployment perhaps? Dropping a binary onto a server and having it just work is a huge benefit. Also, memories of Tomcat. shudder.
- weberc2 9y agoLots 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.
- Erlich_Bachman 9y agoThank 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.