Please, no more types called "State"

Ian Booth ian.booth at canonical.com
Thu Mar 12 05:13:52 UTC 2015


I see the point. But it could be considered analogous to having lots of methods
called New() etc. So long as the types are relevant for the package in which
they're declared then isn't that ok? If we have lots of packages where state
needs to be persisted, how is that different to having lots of packages where a
struct needs to be created, hence there will be several different New() methods.

Many of the current usages are client facades in the various API packages, which
is indeed unfortunate and I wish were different. But let's not universally
reject State types without considering the intended semantics.



On 12/03/15 15:01, David Cheney wrote:
> lucky(~/src/github.com/juju/juju) % pt -i type\ State\ | wc -l
> 
> 23
> 
> Thank you.
> 
> Dave
> 



More information about the Juju-dev mailing list