3 ms·
> But what I can't really figure out is why so many devs love it. I think, in order to understand why so many people love Go, you first need to understand why
by nordsieck 7y ago
> But what I can't really figure out is why so many devs love it.
I think, in order to understand why so many people love Go, you first need to understand why so many people love C.
Go is C with most of the warts removed (for application development). GC, easy strings, maps, easier first-class function syntax, code formatting, modern standard library, easy concurrency, etc.
Yes, there are plenty of places that C can go that Go cannot - operating systems and embedded devices are high up on that list. But for back end application development, it's great as long as your application is of a moderate size and you don't need specialized data structures.
That covers quite a bit of ground.
- firethief 7y ago> GC, easy strings, maps, easier first-class function syntax, code formatting, modern standard library, easy concurrency, etc. So what part of C is not in the list of warts averted in Go?
- jlokier 7y ago> So what part of C is not in the list of warts averted in Go? A simple language with only a few things to learn. Everything built up from those few things.
- firethief 7y agoHuh. "A simple X" is a wily phrase, because everything is exceedingly "simple" in the aspect its designer had in mind[1], but complex from other perspectives. C may be simple in terms of how you would describe it building on the interface provided by a typical CPU, but to someone who only knows Scheme or Haskell learning the machine model is no small task--I don't think the 683-page length of the C11 specification can be attributed to its authors being long-winded. I don't really see Go as having inherited C's simplicity-in-terms-of-differences-from-a-machine-model. If they were optimizing for the same kind of "simplicity" that C has, they'd have to be out of their minds to add garbage collection, strings, maps, lambdas, and goroutines. Go, like Scheme, Haskell, and python, is a different "simple" from C. 1: unless designed by a committee with no such single-minded aim
- _ph_ 7y agoI have so much to agree. There is a reason, why still a lot of software is implemented in C. There are historic reasons of course, but also, because C is just powerful enough to do so, and that gives you a small language, which removes a lot of complexity. Of course, in the case of C, this comes along with the warts of lacking memory safety and limited type safety, which are responsible for a lot of bugs. Other languages like Pascal and Modula-2 did improve a lot in these respects. Yet, all of those languages remain simple. That is the reason, I like Go so much. It is still a very simple language, but improves in the key parts of memory safety, having a GC, better type checking, and a few high level constructs, most of all having first class functions and closures. These enable many of the features of "higher" programming languages. You can do mapping functions over lists in Go quite fine.