<div dir="ltr">On 3 September 2013 18:38, John Colvin <span dir="ltr"><<a href="mailto:john.loughran.colvin@gmail.com" target="_blank">john.loughran.colvin@gmail.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"><div class="im">On Tuesday, 3 September 2013 at 01:18:16 UTC, Manu wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On 3 September 2013 02:19, John Colvin <<a href="mailto:john.loughran.colvin@gmail.com" target="_blank">john.loughran.colvin@gmail.<u></u>com</a>>wrote:<br>
<br>
</div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Monday, 2 September 2013 at 03:14:38 UTC, Manu wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 2 September 2013 04:00, bearophile <<a href="mailto:bearophileHUGS@lycos.com" target="_blank">bearophileHUGS@lycos.com</a>> wrote:<br>
<br>
 Manu:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
 Seriously, how do you quickly read and understand the API through the<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
noise?<br>
<br>
<br>
</blockquote>
The noise increases if you have to repeat the class name for each method<br>
:-)<br>
<br>
<br>
</blockquote>
Except that you can _read the class definition_.<br>
<br>
Look, I'm just giving an account of the collective experience from our<br>
weekend. None of us could find anything easily in each others classes, or<br>
quickly get a reasonable overview of it's design and how it worked.<br>
This leads to needless conversations, asking the other person about it,<br>
and<br>
all those questions that I should be able to understand at a glance.<br>
This WILL affect productivity in the office.<br>
<br>
The reason was that functions were polluting the class declaration. 9<br>
times<br>
out of 10, when I look at a class declaration, I want to know what it is,<br>
what it has, and what it can do.<br>
<br>
</blockquote>
<br>
Code folding? It's a pretty standard feature of most editors since forever.<br>
<br>
</blockquote>
<br></div></div><div class="im">
I think I've repeated myself 3 or 4 times here, but one more time for good<br>
measure...<br>
<br></div><div class="im">
Requiring IDE assistance to make code _readable_ seems completely fail to<br>
me.<br>
1) You're not always reading code in your IDE, often in commit logs, diff<br>
windows, emails, chat clients.<br>
</div></blockquote>
<br>
for some people, all of those things are emacs.</blockquote><div><br></div><div>I've never met a professional at work in well over a decade that uses emacs. Only computer geeks/enthusiasts.</div><div>Granted, this probably reflects industry standards in my work, but it is what it is.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2) With so much hate for IDE support, it seems like a massive contradiction<br>
to say that an IDE should be required to make code readable.<br>
</blockquote>
<br></div>
There's a different between and IDE and an editor, but it's a pretty blurry line. There are lots of people here(myself included) who don't feel the need for a full blown IDE, but I'd be surprised if (almost) anyone here used an editor that didn't support such basic things as code folding.<br>
</blockquote><div><br></div><div>I hate code folding. I think it's even worse. It ruins my mental picture of the code, and it's annoying and fiddly to micro-manage.</div><div>Strangely enough, I've never seen anyone at work use it either.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
anyway, in the end it's a trade-off.<br>
Definitions inside class:<br>
   -you know where it is (never ends up in a different file etc)<br>
   -declarations always in sync<br>
   -it clutters the signature<br>
<br>
   solution: code folding or go-to-next-function or minimal documentation. Worst case you can scroll and you'll know if you've got to the end of the class then it's not there.<br>
<br>
Definitions seperate:<br>
   -clear class signature<br>
   -no idea where to find implementation<br>
<br>
   solution: go-to-definition. Worst case you have to go through separate files searching for a definition by eye. Even if it has to be in the same file, you have no hint where.<br></blockquote><div><br></div><div>Who said anything about separate files? I never said that.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Both cases require some editor features in order to be ideal, but if you don't have those tools (e.g. in all the other places you've mentioned*) then it's just a choice between having to scroll a bit some of the time or having to occasionally go on a blind code-hunt.<br>
</blockquote><div><br></div><div>Yes, it is a *choice*.</div><div>I'm not trying to force you to put your functions outside your class definition if you don't want to.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

*A lot of people use version-control aware editors to do a lot of what you're talking about e.g. view a diff.</blockquote></div></div></div>