~/devreads

#go2.0

5 posts

20 Aug 2017

Dave Cheney 3 min read

This is an experience report about the use of, and difficulties with, the context.Context facility in Go. Many authors, including myself, have written about the use of, misuse of, and how they would change, context.Context in a future iteration of Go. While opinions differs on many aspects of context.Context, one thing is clear–there is almost unanimous agreement that […]

goprogrammingcontextgo2.0

9 Aug 2017

Dave Cheney 3 min read

This is an experience report about a gotcha in Go that catches every Go programmer at least once. The following program is extracted from a larger version that caused my co-workers to lose several hours today. package mainimport "fmt"type T struct{}func (t T) F() {}type P interface { F()}func newT() *T { return new(T) }type […]

goprogrammingexperience reportgo2.0

22 Jul 2017

Dave Cheney 3 min read

A long time ago, someone–I normally attribute this to David Symonds, but I can’t be sure he was the first to say it–said that the reason for adding generics to Go would be the reason for calling it Go 2.0. That is to say, adding generics to the language would be half baked if they […]

goprogramminggenericsgo2.0

14 Jun 2017

Dave Cheney 2 min read

Fifteen years ago Python’s GIL wasn’t a big issue. Concurrency was something dismissed as probably unnecessary. What people really was needed was a faster interpreter, after all, who had more than one CPU? But, slowly, as the requirement for concurrency increased, the problems with the GIL increased. By the time this decade rolled around, Node.js and […]

goprogrammingsmall ideasgenericsgo2.0

24 Oct 2016

Dave Cheney 4 min read

Just so we’re clear, this post is a thought experiment, not any form of commitment to deliver Go 2.0 in any time frame. While I personally believe there will be a Go 2.0 in the future, I’m in no position to influence its creation; hence, this post is mere speculation. Why introduce a new major version […]

goprogrammingsmall ideasgo2.0