<div class="gmail_quote"><div>Greetings!<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">A second, and my main reason for short names, or rather against long<br>
names, is that names should be to the point. None of the names<br>
<br>
newPrimes<br>
topPrime<br>
doFactors<br>
doFilter<br>
<br>
accurately describe the object they represent. The primes are not "new",<br>
the prime is not "on top". The "do" is a prefix does not carry a meaning<br>
either, it just conveys that doFactors has something to do with<br>
factors . This is best expressed by making doFactors a local<br>
definition in the where-block of factors.<br>
</blockquote><div><br>Those remarks are fine with me! I asked about the stylistic changes because I came from the, hm, Java world and would like to avoid "writing familiar things in unfamiliar language". In Java, factors() and doFactors() would be a perfectly named methods: factors() is public, auxiliary doFactors() is private and essentially _does_ the factoring.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">> Out of curiosity, there is any reason why you called the auxiliary function<br>
> 'go' ?<br>
<br>
</div>Convention. Often, an auxiliary function that does basically the same<br>
thing as the main function factors but with an extra parameter will be<br>
named factors' . The apostrophe has the drawback that it's easy to<br>
forget, so some people now name such auxiliary functions go instead.<br>
<div><div></div><div class="h5"></div></div></blockquote><div><br>I think having a local function 'go' in 'factors' is aboslutely plausible: it is local, there's no ambiguity.<br> </div></div>Regards,<br>
Sergey<br>