<div dir="ltr"><div><div>+1 to what Roger said. New features always require changes to existing code so inconsistency is unavoidable if we take a piecemeal approach. <br><br></div>Given that a big rename is planned at some point, and that renaming can be largely automated, continuing to use "environment" internally until the big rename happens may make more sense in terms of maintainability.<br><br></div>Thoughts?<br><br><br><div><div class="gmail_extra"> <br><div class="gmail_quote">On 15 January 2016 at 21:05, roger peppe <span dir="ltr"><<a href="mailto:roger.peppe@canonical.com" target="_blank">roger.peppe@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5">On 15 January 2016 at 06:03, Ian Booth <<a href="mailto:ian.booth@canonical.com">ian.booth@canonical.com</a>> wrote:<br>
><br>
><br>
> On 15/01/16 10:16, Menno Smits wrote:<br>
>> Hi all,<br>
>><br>
>> We've committed to renaming "environment" to "model" in Juju's CLI and API<br>
>> but what do we want to do in Juju's internals? I'm currently adding<br>
>> significant new model/environment related functionality to the state<br>
>> package which includes adding new database collections, structs and<br>
>> functions which could include either "env/environment" or "model" in their<br>
>> names.<br>
>><br>
>> One approach could be that we only use the word "model" at the edges - the<br>
>> CLI, API and GUI - and continue to use "environment" internally. That way<br>
>> the naming of environment related things in most of Juju's code and<br>
>> database stays consistent.<br>
>><br>
>> Another approach is to use "model" for new work[1] with a hope that it'll<br>
>> eventually become the dominant name for the concept. This will however<br>
>> result in a long period of widespread inconsistency, and it's unlikely that<br>
>> things we'll ever completely get rid of all uses of "environment".<br>
>><br>
>> I think we need arrive at some sort of consensus on the way to tackle this.<br>
>> FWIW, I prefer the former approach. Having good, consistent names for<br>
>> things is important[2].<br>
>><br>
><br>
> Using "model" for new work is the correct approach - new chunks of work will be<br>
> internally consistent with the use of their terminology. And we will be looking<br>
> to migrate existing internal code once we tackle the external facing stuff for<br>
> 2.0. We don't want to add to our tech debt and make our future selves sad by<br>
> introducing obsoleted terminology for new work.<br>
<br>
</div></div>The other side of this coin is that, as Menno says, now the code base<br>
will be harder to read because it will be inconsistent throughout (and<br>
not consistently inconsistent either, because the new work is bound to<br>
cross domain boundaries).<br>
<br>
Given that it's not hard to make automated source code changes in Go<br>
(given gofmt, gorename, gofix etc), I wonder if doing it this way might<br>
just be making things harder for people maintaining the code without<br>
actually making things significantly easier in the long run.<br>
<br>
cheers,<br>
rog.<br>
<div class=""><div class="h5"><br>
--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
</div></div></blockquote></div><br></div></div></div>