<div dir="ltr">On 2 September 2013 05:21, Jacob Carlborg <span dir="ltr"><<a href="mailto:doob@me.com" target="_blank">doob@me.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 2013-09-01 16:36, Manu wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Give me one advantage to defining methods inline? I only see<br>
disadvantages. Lots of them.<br>
</blockquote>
<br>
Give me one advantage to repeat the method signature.</blockquote><div><br></div><div>I've listed them, but again:</div><div> * You can read the class declaration; what it has, and does, at a glance.</div><div> * Function's don't have a few extra tab's of white space by default. This means you can more easily understand the flow of code within your class.</div>
<div> * Your code uses less horizontal space.</div><div> * I find it easier to review commit's in diff's, since I can clearly see separation between API changes, and function implementation changes.</div><div><br>
</div><div>I find it much easier to detect the difference between 0, 1 and 2 tabs deep, than 2, 3 and 4 tab's deep.</div><div>I believe there's an exponential falloff to your precision wrt estimating tab depth the deeper it gets. This makes the code less easy to follow; "Am in inside a loop, an if block, or a local function? What depth is the outer scope of the function anyway?" while skimming through code.</div>
</div></div></div>