Go 1.3 beta 1 released
31–40 of 131 posts
Re: Go 1.3 beta 1 released
#32Re: Go 1.3 beta 1 released
#33I'm excited about sync.Pool: http://tip.golang.org/pkg/sync/#Pool There are a lot of cases where people write their own version of this (myself included, but also the connections in database/sql for example). It will be great to have an implementation in the standard library. This technique has been very, very useful in StatHat's production code as we have grown.
Re: Go 1.3 beta 1 released
#34How are we on IDE's? Last time I tried go (over a year ago) I couldn't really find a nice IDE.
Re: Go 1.3 beta 1 released
#35I'm not asking for generics, but I really want an equivalent to Python's set data type for strings and numbers at the leas built-in. I'm aware of golang set on GitHub and the gen project as well, but I'm shocked that Go doesn't have an equivalent to the set data type yet. I'm open to suggestions.
I tend to use map[string]interface{} when I need a set. It works okay.
Re: Go 1.3 beta 1 released
#36How are we on IDE's? Last time I tried go (over a year ago) I couldn't really find a nice IDE.
Re: Go 1.3 beta 1 released
#37Earlier quoted context omitted.
It took Java 5 versions over 8 years to get generics. It's not going to happen in a minor release.
Stop using Java and C++ for comparing generics in Go. There are lots of languages that had generics on day one.
Re: Go 1.3 beta 1 released
#38Earlier quoted context omitted.
s := make(map[string]struct{}) s["foo"] = struct{}{} if _, ok := s["foo"]; ok { // exists } There are varying amounts of fluff you can put on top of this, but that's the basic approach. Wrap it up in a type with methods if you're using it a lot in a program. Perhaps you also want built-in union, intersection, difference, etc. I personally find I need a set with simple membership testing about 10x as often as I need m…
Yes, I was actually looking for the union intersection, etc. functionality. I use that extensively in the project I work on. And it's core enough that I want it in the language, not as a third-party add on because of the performance implications and because of things the language can enforce natively. The Python set data type really is great for a certain class of problems. In particular, graph analysis and traversal…