Can anyone help me on the following sentence? "After a certain point, it becomes clear that functions can benefit from using functions themselves."

I am translating this article to Chinese, but I can't catch it. Thanks.--202.99.60.155 02:11, 17 Jan 2005 (UTC)

It means that it is often useful to break a complex function into calls of less-complex functions. For example, a complex function that reads weather sensors, computes the wheather for next week and produces maps could be broken into three smaller functions that are called in sequence.

--Stephan Leclercq 09:04, 17 Jan 2005 (UTC)

In software engineering, refactoring is *strictly* bound to object oriented code. The term comes from 'factorization'. In OO design, 'to factorize' means 'to distribute responsibilities among classes and objects'.

If you want to talk about behaviour-preserving transformations in structural programs, (or in assembly code or declarative code or whatever) there are other terms, such as 'to restructurize' or 'to reengineer' or similar. Leave refactoring to OOP.

-- Peter

Which type of testing ensures that refactoring does not change the behavior of the code

Unit tests, especially automated ones in the context of test-first or test-driven development, ensure that refactoring does not change the behavior of the code. The Rod 18:53, 30 September 2005 (UTC)Reply