Please, no more types called "State"

roger peppe rogpeppe at gmail.com
Thu Mar 12 15:06:31 UTC 2015


On 12 March 2015 at 14:23, Gustavo Niemeyer <gustavo at 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 majority of those (17/20) are client-side proxies for The State.

Perhaps they could all be renamed "StateProxy" - that wouldn't be bad.

But when you're writing code that uses the type, the semantics won't be
too different whether you're invoking an operation over the network or
not (with the exception of additional possible network failure modes of
course, which largely still exist even in the non-proxied State type
because we're talking over the network to mongodb), so I still think
that State makes sense for those types.




>
> On Thu, Mar 12, 2015 at 11:23 AM, Eric Snow <eric.snow at canonical.com> wrote:
>> On Thu, Mar 12, 2015 at 5:08 AM, Michael Foord
>> <michael.foord at canonical.com> wrote:
>>> 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 it actually was and when someone mentioned State you
>>> couldn't be sure what they meant - was a significant part of the learning
>>> curve.
>>
>> I had the same experience.
>>
>>>
>>> Perhaps a better solution would have been a better name for the core State.
>>
>> +1
>>
>> -eric
>>
>> --
>> Juju-dev mailing list
>> Juju-dev at lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
>
>
>
> --
>
> gustavo @ http://niemeyer.net
>
> --
> Juju-dev mailing list
> Juju-dev at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev



More information about the Juju-dev mailing list