To Factor Is To Automate

Factoring a piece of code (I deliberately conflate factoring and refactoring) is the same thing as automating.

Factoring means taking a piece of repeated code like this (example in C++):

 myArray[i].structField.x = 1;
 myArray[i].structField.y = 2;
 myArray[i].structField.z = 3;

And factoring out the repetition like this:

 StructType & s = myArray[i].structField;
 s.x = 1;
 s.y = 2;
 s.z = 3;

That's the same thing as automation, because the computer is doing the repetition for you as a result of the factorization.

New programming languages give you new ways to factor your code, which also means you are being given new ways to automate the task of programming.


This has to do with TurningTheCrank and ReFactoring and OnceAndOnlyOnce.


EditText of this page (last edited September 21, 2004) or FindPage with title or text search