Re: Please, no more types called State

2015-03-12 Thread roger peppe
On 12 March 2015 at 07:22, Andrew Wilkins andrew.wilk...@canonical.com wrote: On Thu, Mar 12, 2015 at 2:53 PM, Tim Penhey tim.pen...@canonical.com wrote: On 12/03/15 18:13, Ian Booth wrote: I see the point. But it could be considered analogous to having lots of methods called New() etc.

Re: Please, no more types called State

2015-03-12 Thread Michael Foord
On 12/03/15 05:01, David Cheney wrote: lucky(~/src/github.com/juju/juju) % pt -i type\ State\ | wc -l 23 Thank you. When I was new to Juju the fact that we had a central State, core to the Juju model, but we had umpteen types called State - so where you saw a State you had no idea what

Re: Please, no more types called State

2015-03-12 Thread Frank Mueller
Perhaps a better solution would have been a better name for the core State. Michael + ​1 Also matches my sprint topic about an improved management of our persistency ​(separation of model types and interfaces for their persistency; grouped by domains; instantiated by factories to allow

Re: Please, no more types called State

2015-03-12 Thread Gustavo Niemeyer
When I was new to juju myself, we only had one State, I believe. That one golden state was supposed to represent the state of the whole deployment, so it was indeed The State of the system. Having tons of these indeed sounds awkward. On Thu, Mar 12, 2015 at 8:08 AM, Michael Foord

Re: Please, no more types called State

2015-03-12 Thread roger peppe
On 12 March 2015 at 14:23, Gustavo Niemeyer gust...@niemeyer.net wrote: The core state (The State) is the one case where it doesn't matter, IMO. Everybody knows what it is. It's the other dozen that create the issue, and they will remain as ambiguous if you just rename the one State. The

Re: Please, no more types called State

2015-03-12 Thread Tim Penhey
On 12/03/15 18:13, Ian Booth wrote: 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,

Re: Please, no more types called State

2015-03-12 Thread Ian Booth
On 12/03/15 16:53, Tim Penhey wrote: On 12/03/15 18:13, Ian Booth wrote: 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

Re: Please, no more types called State

2015-03-11 Thread Ian Booth
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