Had another 48hr game jam this weekend...
Manu
turkeyman at gmail.com
Sun Sep 1 20:57:36 PDT 2013
On 2 September 2013 05:21, Jacob Carlborg <doob at me.com> wrote:
> On 2013-09-01 16:36, Manu wrote:
>
> Give me one advantage to defining methods inline? I only see
>> disadvantages. Lots of them.
>>
>
> Give me one advantage to repeat the method signature.
I've listed them, but again:
* You can read the class declaration; what it has, and does, at a glance.
* 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.
* Your code uses less horizontal space.
* I find it easier to review commit's in diff's, since I can clearly see
separation between API changes, and function implementation changes.
I find it much easier to detect the difference between 0, 1 and 2 tabs
deep, than 2, 3 and 4 tab's deep.
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130902/d7bb6049/attachment.html>
More information about the Digitalmars-d
mailing list