Things which may be of interest in Go v1.4

Eric Snow eric.snow at canonical.com
Thu Dec 11 16:52:43 UTC 2014


Thanks for writing this up, Katherine!

On Thu, Dec 11, 2014 at 9:21 AM, Katherine Cox-Buday
<katherine.cox-buday at canonical.com> wrote:
> go generate
> https://golang.org/doc/go1.4#gogenerate
> This is *very* powerful and could reduce the number of copy/paste snippets,
> or unsafe reflection code we have to write. For those of you who are
> familiar with the lisps, this is essentially macros. You write code that
> examines Go expressions and does something. This code is triggered by
> //go:generate command arg comments in the code. As a quick example, our
> StringSet type could be generated and even expanded to encompass any type.

Cool.  So generics via macros?

> https://golang.org/doc/go1.4#internalpackages
> Just what it sounds like. We can now hide implementation details from
> importers. Probably more useful for the ancillary Juju packages as Juju Core
> is probably not imported very much.

Nice.  This would be good for our various testing sub-packages, among
other things.

-eric



More information about the Juju-dev mailing list