lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Corrected comments and a function check_meshing_chords divided in tw


From: Łukasz Czerwiński
Subject: Re: Corrected comments and a function check_meshing_chords divided in two. (issue 5975054)
Date: Sun, 15 Apr 2012 15:57:55 +0200



On 14 April 2012 21:12, <address@hidden> 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, <address@hidden> 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/

Ok, I'll merge it back.

Łukasz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]