<div dir="ltr">On 8 November 2017 at 10:54, Benjamin G <span dir="ltr">&lt;<a href="mailto:benjamin.garrigues@gmail.com" target="_blank">benjamin.garrigues@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">All your use cases make perfect sense, however i see one potential issue with this &quot;pattern&quot; : <div><br></div><div>I&#39;ve seen a LOT of iOS developers (some juniors, some not) ending up with monstruous UIViewControllers, and it has happened almost since the very beginning of iOS development. Because of their lack of understanding of the MVC pattern, they completely under estimate either the model or the view layer and put too many things in their VC. </div><div><br></div><div>Now this pattern would give them the illusion that they&#39;re working in a sane architecture and that they&#39;ve decomposed the problem correctly, but in fact were not. The fact that extension wouldn&#39;t let you add variable makes it harder to conceal the problem, but with &quot;continuations&quot; i can see no limit.</div><div><br></div><div>What do you think ? </div><div><br></div></div></blockquote><div><br></div><div>good tools won&#39;t fix bad developers (c)</div><div><br></div><div>you know that you can already sort of &quot;store variables&quot; in extensions, right? obj-c associated object is one way (1). and if we are talking about the use case of extending &quot;your own types only&quot; -- i am -- your own classes are under your full control, so nobody stops you from having, say, an &quot;extensionVars&quot; dictionary in your root class(es) and a handy set of generic api&#39;s to get/set those in a convenient manner without too much effort (2). is it ideal? no. performance suffers. usability suffers. non trivial to have weak/unowned variables with (2). not a &quot;first class citizen&quot; solution. the sheer number of hits of &quot;how to i store variables in extensions in swift&quot; (more than a million now) hints you that the language can step in to help, at least in the critical use case of &quot;own types&quot;.</div><div><br></div><div>Mike</div><div><br></div></div></div></div>