Golang News http://golangnews.com Jobs, Code, Videos and News for Go hackers - everything about the go programming language Sun, 17 Sep 2017 07:07:00 +0000 A use case for Go generics in a Go compiler #experiencereport #go2 This is a (very) rare work-related entry. I mostly work on the compiler for a programming language named “Go”, and one of the problems we face is if and how we should add “generics” to a future version of Go. I can’t possibly summarize easily for a non-technical reader, but the TLDR version is (1) lots of other languages have generics (2) we’re pretty sure they’re useful (3) but they come with associated costs and complexity and we’re not sure they’re worth it. Also, “generics” is not just a single thing, there’s several semantic variants and several ways to implement them (for example, erased versus dictionary-passing versus template-stamping).  6 points posted by daenney https://dr2chase.wordpress.com/2017/08/09/a-use-case-for-go-generics-in-a-go-compiler 2499 Thu, 10 Aug 2017 13:51:00 +0000