blob: f81e8d6735fb72cd8d4419eec88847b6942aabba [file] [log] [blame]
The State of Go
Where we are in June 2014
Andrew Gerrand
* Yesterday
* Initial reception
Looking back on the first months.
* Complaints
The complaints started right away
.image gosf/msg-wrong.png _ 600
.image gosf/msg-lacks.png _ 600
* Familiar complaints
.image gosf/msg-generics.png _ 600
.image gosf/msg-type.png _ 600
.image gosf/msg-exceptions1b.png _ 600
* Familiar complaints
.image gosf/indent.png 500 _
The first HN thread about Go was mostly an argument about braces and indentation.
* Historic moments
The first public language change (Dec 10, 2009):
.image gosf/msg-semi.png _ 400
* The gopher
.image gosf/msg-logo1.png _ 800
.image gosf/sadgopher.png _ 250
* The gopher
.image gosf/msg-logo2.png _ 800
* The gopher
.image gosf/msg-logo3.jpg _ 700
* A keen observation
.image gosf/msg-exceptions2.png _ 800
* Signs of hope
.image gosf/msg-nogenerics.png _ 600
* Today
* Growth
.image gosf/redmonk.png _ 600
.image gosf/oloh.png
* User groups
Today there are 48 active user groups in 15 countries across 5 continents.
* GopherCon
.image gosf/gophercon.png
Community-driven. 3 days. 700 attendees. 24 talks. 1 panel. 4 hours of lightning talks!
* The gopher
.image gosf/gophers.jpg
* The gopher
.image gosf/bus.jpg
* The gopher
.image gosf/tattoo.jpg
* Go 1.3
Released last Wednesday, 18 June 2014.
- Native Client support (amd64, 386)
- DragonFly BSD, Plan 9, and Solaris support
- Improved performance (GC, contiguous stacks, race detector, regexp)
- Faster incremental builds (linker overhaul)
- Precise GC of stacks
- Static analysis in godoc
* Tomorrow
* Upcoming conferences
.image gosf/dotgo.png
.image gosf/india.png
* Go 1.4
Due December 1st, 2014.
What might be in it? (Speculative list follows.)
* New language features
* Canonical import paths
A means for a repository to specify its canonical import path.
Goal: stop people from checking out repos from the wrong path.
- Stable vanity import paths.
"" -> ""
- Make GitHub's fork model less painful.
(Proposal forthcoming.)
* Internal packages
Current proposal:
"An import of a path containing the element “internal” is disallowed if the importing code is outside the tree rooted at the parent of the “internal” directory."
- Code in `/a/b/c/internal/d/e/f` can be imported only by code in the directory tree rooted at `/a/b/c`.
- `$GOROOT/src/pkg/internal/xxx` can be imported only by other code in the standard library (`$GOROOT/src/`).
And, later:
- `$GOPATH/src/mypkg/internal/foo` can be imported only by code in `$GOPATH/src/mypkg`.
* src/pkg → src
Move the standard library from `$GOROOT/src/pkg` to `$GOROOT/src`.
Basically makes `$GOROOT` work just like `$GOPATH`.
(Not a big deal for most, but a nice clean up for the core.)
* File system access throttling
Throttling of access to the file system at the `os` package level.
- Launch a million goroutines that do file system stuff.
- Don't launch a million operating system threads to block on the syscalls.
Make it work just as nicely as it does with the network.
(Proposal forthcoming.)
* "go generate"
A convenience for generating Go source code. Example uses:
- yacc: generating .go files from yacc grammar (.y) files
- protobufs: generating .pb.go files from protocol buffer definition (.proto) files
- HTML: embedding .html files into Go source code
- Other ideas abound
Proposed mechanism:
Add generator directive in Go source files:
//go:generate yacc -o gopher.go gopher.y
Use the Go tool to execute the directives:
% go generate [packagepath]
(Proposal forthcoming.)
* More tool chain work
- `cmd/go` support for `gccgo`
- `cmd/go` support for embedded data files
- Race detector improvements
The transition from C to Go continues:
- Linker rewritten in Go (`cmd/link`)
- Assembler rewritten in Go (`cmd/asm`)
- Possibly: `cmd/gc` translated to Go
* Better GC and malloc
- The existing allocator is based on TCMalloc (designed for C/C++). It can be re-designed to better suit Go.
- Lighter representation and colocation of GC metadata.
- Various strategies for reducing GC pause time (concurrent sweep, etc).
Rough estimate: 10-20% overall speedup, 20-50% GC pause reduction, 5-10% RSS reduction.
* Other runtime changes
Concurrency improvements:
- Lock-free fast path for non-blocking receive from empty channel.
- Rewrite select to hold only one channel lock at a time.
C to Go:
- G-stack runtime converted to Go.
* Package changes
- Easier structuring features in `text/template`
- Bring `reflect.Value` back to 3 words
- Fix embedded field visibility (`reflect`)
- Safe version of `encoding/gob`
- Unicode 7 support
* Ports
- Native Client `arm`
- PowerPC 64
- ARM64
* Go support for Android
Go support for the NDK. (Like C/C++ today, but better!)
Goal: enough support for writing games.
Based on the work of Elias Naur and others in the community.
* More
* Questions?