in reply to Re^3: Hierarchy of code reuse by flexibility
in thread Hierarchy of code reuse by flexibility

I like the term 'code template' :) When I was writing 'code generation' in this meditation I was mostly thinking about tools like h2xs and Module::Starter - but 'code template' is more precise.

So how would you pin down the use case for C&P and code templates? When it is justifiable and when not? I am thinking about this because I've just released Catalyst::Example::InstantCRUD - which is a scaffolding a la Rails - i.e. code template. Is scaffolding something really useful or is it only a illusion of the beginning programmers - and it creates more problems than it solves?

  • Comment on Re^4: Hierarchy of code reuse by flexibility

Replies are listed 'Best First'.
Re^5: Hierarchy of code reuse by flexibility
by doom (Deacon) on Feb 18, 2009 at 12:56 UTC

    What I would say is you should use code abstraction by default, and resort to templates only to automate frequent coding tasks that resist that kind of code abstraction.

    Really, we've all got "code templates" in our head, and there's no point making us type them over and over again...