On Sun, Oct 14, 2018 at 09:10:56PM +0200, Emanuel Berg wrote: > tomas wrote: > > > Code "grows", one single (minimum-effort) > > step by step [...] > Code grows, but not necessarily by enlonging > the defuns that are already there [...] Most of the time it does, though: *this* is the path of least resistance, for small steps. > when some new situation arrives, write yet > another defun to handle it. Then call it from > the original function. That way the original > function grows, but only by a single line. On the long term this tends lead to horrible code, where the defuns reflect all the history of the situations, as they arrived, not the problem's structure as it is *now*. But yes, you see something of that in actual code -- real life is always a compromise. > To do this is much, much simpler than to write > an insanely long defun, and when insanity > becomes a problem, try to "refactor" it! I've seen lots of code evolve. I'm an old guy. My experience seems to contradict your assessment above. Keeping code clean, always finding the right abstractions and enforcing them throughout takes a non-trivial amount of effort. I tend to think that "it's worth it", at least in terms of self-esteem and developer satisfaction, and I like to think that, in the long term, it amortises itself in terms of effort, but for the last one I can't say whether (or when) it is wishful thinking or not. Cheers -- tomás