Automatic code refactoring

renoX renosky at free.fr
Sat Aug 4 12:21:52 PDT 2007


Robert Fraser a écrit :
> Ingo Oeser Wrote:
>>> - Inline a function (either a single invocation of it or
>>> everywhere it's used).
>> Let the compiler do that. Always! Everything else just asks for
>> long function bodies, if junior programmers try to "optimise" code.
>> 
> 
> I wasn't thinking about optimization... sometimes you want to change
> only part of a function and for whatever reason (it's in a library or
> someone else's code, it would only be useful in that one invocation,
> etc.), you don't want to add another parameter.

Copy/paste programming is usually a very bad form of programming, so I'm 
not sure that it should be helped..

renoX



More information about the Digitalmars-d mailing list