<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Aug 20, 2014 at 10:46 AM, Matthew Williams <span dir="ltr"><<a href="mailto:matthew.williams@canonical.com" target="_blank">matthew.williams@canonical.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>Any default-hook that deviated from this pattern could find itself being run multiple times in succession - I wonder if that might be confusing/ unexpected to a charm author?</div></div></blockquote><div>
<br></div><div>It'll run multiple times in succession regardless, independent of switching -- but, yes, unless it switches it'll always do the same thing :). I don't *think* it's unexpected that we'd run default-hook once for each missing hook, supplying the substituted hook name every time.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">

<div>Gustavo's observation about hooks that the charm might no know about yet means that the else clause is absolutely required, I wonder if that's obvious to someone who's new to charming?</div></div></blockquote>
<div><br></div><div>I'm pretty much adamant that we shouldn't even run new hooks, or expose new tools, unless the charm explicitly declares it knows about them. But I do imagine that many implementations will want the else anyway: they don't need to provide an implementation for every single hook anyway.</div>
<div><br></div><div>Cheers</div><div>William</div></div></div></div>