8 ms·
Go 1.3 is released
- cnbuff410 12y agoCongrats, guys! Thanks for the great effort.
- zkirill 12y agoCongratulations and excellent work!!!
- nkozyra 12y agoGC changes are probably most exciting ( deference to the support for Plan 9 ;) ) I still can't tell if it's evolved beyond a mark-and-sweep - I have to assume no - we've heard the GC would be seeing improvements and that the current (now older) method was stop-gap.
- enneff 12y agoThis is still the mark and sweep collector. We hope to veg begin work on a new GC over the next few months.
- Zariel 12y agoFrom the release notes, >> The garbage collector has been sped up, using a concurrent sweep algorithm, better parallelization, and larger pages. The cumulative effect can be a 50-70% reduction in collector pause time.
- 4ad 12y agoMinor note. Go had some form of Plan 9 support for years, mostly broken though, we just made it much much better this release.
- nkozyra 12y agoI would have assumed Plan 9 would have been supported in some capacity for obvious reasons,
- natural219 12y ago...But does it have generics?
- duaneb 12y agoI think it's pretty clear by now Go is not aligning itself with type parameters. If you need generics, don't use Go. Most programs probably don't need generics.
- seanmcdirmid 12y agoMost programs don't need generics like most programs don't need static typing. Just use "any" and downcast.
- gohrt 12y agoThat's entirely different. Generics can be replaced by code-generation (C++-style templates) in a preprocessor with no loss of safety, or by boring copy-paste (with some loss of safety :-(). non-static typing is a massive loss of safety.
- pcwalton 12y agoStatic typing can be replicated in a dynamically typed language with a preprocessor too. (For example, see TypeScript.)
- seanmcdirmid 12y agoTemplates/macros/preprocessing do sacrifice separate compilation and separate type checking; so your error messages might not be comprehensible, your compile times can be much slower, and...you need source for your generic container. Rob Pike probably knows the drawbacks of that approach well and I doubt he would go there.
- collinvandyck76 12y agoMost programs don't need generics, but a lot of programs benefit from having them. This, along with exceptions, are the two things that keep me from considering Go for future service development. We've stood up a couple of successful Go services, but the maintenance overhead from not having these two things has been substantial.
- lcampbell 12y ago> Previously, all pointers to incomplete struct types translated to the Go type *[0]byte This makes me really happy. I end up writing a lot of bindings to C libraries (libjpeg, libpng, etc), some of which use incomplete types to hide the contents of their internal structs. With this fix I'll finally be able to work within the constraints of the typesystem and stop hacking around it with casts to/from unsafe.Pointer.
- yelnatz 12y agoVery excited about Sync.pool and the contiguous stack.
- Scaevolus 12y agoThe static analysis features are exciting: http://golang.org/lib/godoc/analysis/help.html http://golang.org/lib/godoc/analysis/help.html "Because concurrent Go programs use channels to pass not just values but also control between different goroutines, it is natural when reading Go code to want to navigate from a channel send to the corresponding receive so as to understand the sequence of events. Godoc annotates every channel operation—make, send, range, receive, close—with a link to a panel displaying information about other operations that might alias the same channel." Understanding large concurrent programs is significantly easier with a precise pointer analysis to help you track objects.
- timewasted 12y agoI rather like the new Server.ConnState callback, as well as the various HTTP timeouts. Yay for simple but useful quality of life improvements!
- lbotos 12y agoCurrent Go users, What's the state of package versioning right now? Is vendorization still the answer?
- ansible 12y agoIn my opinion, yes, vendor-izing your dependencies is the way to go. My preferred way to do that is to use git subtree.
- collinvandyck76 12y agoYep. Either through godep or a VCS-native solution like git submodules or git subtrees.
- AYBABTME 12y agoThere are other ways around, but I'd say the community is solidifying towards godep. Someone correct me if I'm wrong.
- leef 12y agoNo need to vendor. Use Godep without copying (godep save -copy=false) to create the equivalent of a bundler.lock file and check that into source.
- joncooper 12y agoAnother +1 for godep.
- mediocregopher 12y agoAlso, for variety (and a shameless plug), check out: https://github.com/mediocregopher/goat https://github.com/mediocregopher/goat
- CMCDragonkai 12y agoCheck out gom, it's really popular too.
- jsmthrowaway 12y agogodep is winning and works well, but I still think there's an opportunity for something like a Go-flavored CPAN.
- DAddYE 12y agoI'm very happy for this: "Cross compiling with cgo enabled is now supported. ... Finally, the go command now supports packages that import Objective-C files (suffixed .m) through cgo." Great news!!!!!!!!!!!!!!!!!!!!
- chrissnell 12y agoI'm a little confused at what it takes to get this going. I want to use cgo for a linux/arm target, built on darwin/amd64. Do I need to first build a gcc toolchain for linux/arm on my Mac?
- 4ad 12y agoYes.
- frik 12y agowarning: GOPATH set to GOROOT (T:\Tools\Go) has no effect go build runtime: windows/386 must be bootstrapped using make.bat So, if you installed Go in a different directory, ignore the Windows environment vars "PATH" entry and just execute the "make.bat" in the "Go\src\" directory - the first time.
- frakturfreund 12y agoThe release notes mention the graceful shutdown of a http.Server: "The net/http package now provides an optional Server.ConnState callback to hook various phases of a server connection's lifecycle (see ConnState). This can be used to implement rate limiting or graceful shutdown." Knows anyone here a code example for this?
- lbarrow 12y agoI'm super pumped about this -- I plan to spend the weekend upgrading a graceful shutdown server I maintain to use it. https://github.com/braintree/manners https://github.com/braintree/manners
- AYBABTME 12y agoYou can look at the test: http://golang.org/src/pkg/net/http/serve_test.go?#L2309 http://golang.org/src/pkg/net/http/serve_test.go?#L2309
- mathrawka 12y agoPlease note that net/http does not implement graceful shutdown, 1.3 has made it easy to implement in your application code.
- dchest 12y agohttps://github.com/rcrowley/go-tigertonic/compare/go1.3 https://github.com/rcrowley/go-tigertonic/compare/go1.3
- ohwp 12y agoMaybe the time has come for Google to use Go for Android. I think it will give Go a nice boost.
- dcre 12y agoSwift's high-level syntax will probably open up iOS development to many people who otherwise would have seen Objective-C's square brackets and run away. I like Go a lot, but Google switching to it for Android would probably have the opposite effect. Many people learn Java in school. Almost no one learns Go.
- deleted 12y ago[deleted]
- bsg75 12y agoPeople don't learn Objective-C in school, but it has not slowed down adoption of the language for the iOS platform. If the platform is popular, and a language supports it well, programmers will learn.
- aclissold 12y agoI love Go; having Go as an option for Android development would be awesome because the language is just so much fun. I'm not getting my hopes up though, because Go was intended for server-side stuff. Object-oriented design is a great strategy for rapid app development, and this is the key different between Swift and Go that I've noticed.
- gejjaxxita 12y agoAs a scientific programmer I find it a shame that they have decided not to go with operator overloading. The rationale from the FAQ is that it "seems more a convenience than an absolute requirement". In the case of scientific software though it usually is a requirement.
- phlyingpenguin 12y agoI'm very curious why you say operator overloading is a requirement. It's certainly nice to look at code with operator overloading when you're trying to understand a problem (or maybe it's a curse when you're trying to understand what a block of code actually does!), but it's the plainest case of syntactic sugar I can think of in language design. What are you getting from operator overloading that you can't get from chaining methods?
- Loic 12y agoIf you work with vectors and matrices and do a lot of computations, it is very convenient to be able to express, thanks to operator overloading, the formula you have on paper into code with nearly the same syntax. This is one area where, for example, FORTRAN still shines. You can can really TRANslate your FORmula into code easily. In the case of FORTRAN it is because the vector and matrices are recognized types, in other language, they are not built-in types but the convenience is added thanks to operator overloading.
- fulafel 12y agoA simple preprocessor for transforming custom infix operators to method calls might do the trick here. Go comes with good libraries to make this, you wouldn't have to invent a new Go parser. There are other preprocessors that you can look at for inspiration.
- gress 12y agoThat would produce a custom language not understood by other Go users and destroy much of the benefit of the compiler reporting errors straightforwardly.
- emanuelez 12y agoI just noticed this session in the Go track for Google IO... It might be nothing of course, but I don't remember seeing anything Android related in a Go session before: https://www.google.com/events/io/schedule/session/eeeb1991-0ce1-e311-b297-00155d5066d7 https://www.google.com/events/io/schedule/session/eeeb1991-0...