|
![](/i/fill.gif) |
> One
> aspect is about visual perception: In your version, the reader has to
> first figure out what is code and what is explanation, whereas in Andy's
> version it's one and the same.
Except Andy's version doesn't actually have any code, it's hidden away
in a separate method (which you would either need to search or scroll to).
Especially with comments being highlighted in most code editors, I
personally find this much more useful:
prime = array[0]; // get next prime
thank this:
prime = GetNextPrime(array);
What seems to be being advocated is to replace source code like this:
<trivial code> <comment>
with this:
<call a function with "comment" name>
...
<function definition of "comment">
<trivial code>
</>
Sorry I don't see the benefit.
Post a reply to this message
|
![](/i/fill.gif) |