John gives good motivation. Usually one should just use a featureful environment/library that provides this stuff. However, as he says, you sometimes want simple standalone functions. Motivations include simple distribution, or encouraging people to try things out when they don't have time or energy to learn a new environment [1].
3 comments
[ 3.5 ms ] story [ 20.5 ms ] thread[1] example from my experience, http://www.inf.ed.ac.uk/teaching/courses/it/code/
http://www.johndcook.com/blog