News for hackers. Stuff that matters.
Re:Go 1 Release Candidate 1 by BarkMore on Wednesday March 14, 2012 @03:06AM (#3702127)
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 :).

Re:Go 1 Release Candidate 1 by densh on Wednesday March 14, 2012 @04:29AM (#3702258)
Some 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).

Re:Go 1 Release Candidate 1 by masklinn on Wednesday March 14, 2012 @05:03AM (#3702342)
> Some of your points are not really fair:

Go also has generics, they just are not available to lowly peons writing new Go types.

Re:Go 1 Release Candidate 1 by BarkMore on Wednesday March 14, 2012 @12:36PM (#3703924)
My 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.)

Re:Go 1 Release Candidate 1 by sdegutis on Wednesday March 14, 2012 @06:38PM (#3705794)
+1
Re:Go 1 Release Candidate 1 by lclarkmichalek on Wednesday March 14, 2012 @04:23AM (#3702246)
Funny, 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.

Re:Go 1 Release Candidate 1 by densh on Wednesday March 14, 2012 @04:42AM (#3702288)
You 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.

Re:Go 1 Release Candidate 1 by canop_fr on Wednesday March 14, 2012 @04:35AM (#3702270)
A 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

Re:Go 1 Release Candidate 1 by dchest on Wednesday March 14, 2012 @08:19AM (#3702800)
Even 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.

Re:Go 1 Release Candidate 1 by drivebyacct2 on Wednesday March 14, 2012 @06:06AM (#3702471)
>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?

Re:Go 1 Release Candidate 1 by MatthewPhillips on Wednesday March 14, 2012 @08:03AM (#3702767)
I'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.
Re:Go 1 Release Candidate 1 by drivebyacct2 on Wednesday March 14, 2012 @08:16AM (#3702790)
Most 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.
Re:Go 1 Release Candidate 1 by beza1e1 on Wednesday March 14, 2012 @04:35AM (#3702271)
If those reasons matter to you, try D. http://dlang.org/
Re:Go 1 Release Candidate 1 by ootachi on Wednesday March 14, 2012 @12:07PM (#3703787)
Or Rust.
Re:Go 1 Release Candidate 1 by drivebyacct2 on Wednesday March 14, 2012 @02:10PM (#3704494)
I 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.

Re:Go 1 Release Candidate 1 by pcwalton on Wednesday March 14, 2012 @08:08PM (#3706096)
What 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.
Re:Go 1 Release Candidate 1 by pjmlp on Wednesday March 14, 2012 @05:06AM (#3702355)
+1
Re:Go 1 Release Candidate 1 by insertnickname on Wednesday March 14, 2012 @06:24AM (#3702520)
Why do you do this? Isn't it enough to just upvote?