5 ms·
According to various sources on the Interwebs, Go sucks for one or more of the following reasons: - No generics. - No exceptions. - No inheritance. - Nullab
by BarkMore 15y ago
According to various sources on the Interwebs, Go sucks for one or more of the following reasons:
- No generics.
- No exceptions.
- No inheritance.
- Nullable pointers.
- No decimal types (yet they put in complex!)
- No IDE.
- No support for GUI applications on Microsoft Windows.
- Go ignores years of academic research on language design.
Please ignore the people who are happily productive with the language :).
- lclarkmichalek 15y agoFunny, none of those reasons are why I now avoid go. For me what killed it was: - Forcing one brace style - Forcing naming conventions to a certain extent - To use the Go tool you are required to have your directories set up in a specific way - All types are not equal: No support for using user defined types as map keys, maps are generic, but user defined types are not - Two initialization functions, new and make. One returns a pointer, the other a struct. Seeing as go makes no distinction between the stack and the heap, is there need for two. Convention over configuration is great and all, but it really felt as if it was being used as an excuse to force me to use someone else's style. Even python which catches flak for forcing indentation as tabs let's you choose the indentation depth and character. Go made me feel slightly violated; forcing my directory layout was the last straw, and the lack of any configuration in a place where it would not be complex to add it seamed stupid.
- canop_fr 15y agoA few comments : - I find that having a common style about source files from different origins (we're in the open source era) and common naming conventions are great for the readability. I can decipher foreign code much easier if I don't have to set my mind about the bracing style. And seriously, would you prefer to have "private" and "public" all in the place instead of this simple convention ? - I found it a little painful too, at first, to have to mix source and binary in my projects with the advent of the go tool but the removal of redundant makefiles and its simplicity of use, especially when you deal with a lot of projects and packages from diverse origins is so great that it's hard to protest against that. - Are you sure you're up to date about map keys ? http://tip.golang.org/ref/spec#Map_types http://tip.golang.org/ref/spec#Map_types
- densh 15y agoYou can't imagine how annoying is it in python world to use libraries which always provide inconsistent naming scheme. You'll easily find camelCase, snake_case, nocapitalorunderscorecase in any large project. Even though pep8 exists, neither standard library nor most of 3rd party developers conform to it. Go's CapitalEverythingNaming convention is quite annoying but the mere fact that it'll be used everywhere makes me happy.
- drivebyacct2 15y ago>Forcing one brace style This has been discussed numerous times on the mailing list. The answer, for good reasons, is too bad. As you note in your conclusion, consistency is prioritized above configuration. There's reasons for this, they were meticulously debated and chose by the designers to help people out. If you have a pure Go project, you can install it anywhere Go is available in a single command. No autotools, no makefiles, no build-essentials, nothing. Just a single `go get` command. If you ever work on a decent sized project in Go, you will quickly come to appreciate the enforced consistency across the project. >To use the Go tool you are required to have your directories set up in a specific way Not with the binary distribution. And "have a source directory on GoPath" is too restrictive... set `GOPATH=~` and for 90%+ of users, their existing dir structure is perfectly fine. >No support for using user defined types as map keys This is no longer true IIRC. >Two initialization functions, new and make. One returns a pointer, the other a struct. I don't understand why this is a negative?
- MatthewPhillips 15y agoI've been off Go for a while, weren't they thinking about getting rid of new at some point? I recall a long thread on the mailing list debating dropping it.
- drivebyacct2 15y agoMost of the "debates" I've seen have been people desperately trying to explain that they do different things under the hood and thus removing the different keywords adds 'magic' that they don't want.
- dchest 15y agoEven python which catches flak for forcing indentation as tabs let's you choose the indentation depth and character. You can use any indentation depth in Go too. But in Python you can't get rid of indentation because its lexer expects it, just like you can't get rid of the "forced" brace style in Go, because its lexer expects it.
- densh 15y agoSome of your points are not really fair: Go does have exceptions under a different name called "panic". It's named differently to communicate why they were added to the language (read docs for details) and their expected use-case. Go does have a variation of inheritance called embedding. Using embedding you inherit all methods and fields of the former type but that does not provide is-subclass relation between types. In order to have abstract-class-like behavior one would use interfaces. --- At the moment Go is mostly useful for creating lean network services. "net" package from standard library is really good. Goroutines are scheduled with the respect to system calls so all your code is effectively async without any jumps and hoops (no callbacks!). There are few packages in other areas (gui) but that's not the fault of the language. You're welcome to write new ones or wrap existing C libraries (and that's really easy in Go).
- masklinn 15y ago> Some of your points are not really fair: Go also has generics, they just are not available to lowly peons writing new Go types.
- beza1e1 15y agoIf those reasons matter to you, try D. http://dlang.org/ http://dlang.org/
- pjmlp 15y ago+1
- insertnickname 15y agoWhy do you do this? Isn't it enough to just upvote?
- ootachi 15y agoOr Rust.
- drivebyacct2 15y agoI want to like Rust because it's mentioned everytime Go is, but the syntax is just so disgusting. I know that seems petty and is a personal opinion, but part of the joy of Go is that anyone can grok it immediately. I've had three projects now on GitHub that I've built for classmates. Several of them have told me that they were able to read the source very easily (after an explanation of `go` for goroutines). I don't find that to be the case with Rust, even for relatively small examples. As for D, I simply need to give it another go, pardon the choice of words.
- pcwalton 15y agoWhat in particular do you not like about the syntax of Rust? We're still designing the language and we are very much open to suggestions.
- BarkMore 15y agoMy point is that people are happy and productive using the language despite the list of complaints about missing features. (I will avoid any attempt at humor in future posts on this site.)
- sdegutis 15y ago+1
- deleted 15y ago[deleted]