On 14 April 2012 21:12, <[email protected]> wrote:

> Splitting the function in two doesn't make it any easier for me to
> understand, but I had figured it out before.
>
> On 2012/03/21 18:56:08, Milimetr88 wrote:
>
>> What I was taught at the university is to write short
>> and simple functions that do only one thing.
>>
>
> Maybe this was intended as advice for when you initially write code; it
> would encourage the writer to find the smallest independent tasks and
> cleanest interfaces between those tasks.  Splitting up an existing
> function, that has grown into its assigned task and assigned interface,
> is different.




On 14 April 2012 22:37, <[email protected]> wrote:

>
> Splitting the function into two parts does not make sense since the
> first part has no well-defined output that can be considered reasonably
> independent from the requirements and workings of the algorithms in the
> second part.  When you are redesigning the second part, you'll need to
> redefine the "interface" between the two parts and the first part as
> well.  Whether or not you put an artificial function call boundary in
> the middle of the function, it is not composed of modular parts that
> could be reused in different contexts.
>
> Modularity is not a self-serving goal.
> http://codereview.appspot.com/**5975054/<http://codereview.appspot.com/5975054/>
>

Ok, I'll merge it back.

Łukasz
_______________________________________________
lilypond-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to