Automatic code refactoring

Robert Fraser fraserofthenight at gmail.com
Sat Aug 4 11:34:09 PDT 2007


BCS Wrote:

> I'd go the other way
> 
> I would like this is convert a class to abstract, derive a cocreate class 
> from it that acts as the original class does, replace all 'new's and derivations 
> with this new class.
> 
> 
> extract interface from several classes (only ask about overlapping functions)
> 
> 
> convert "auto T = ..." to it's actual type
> ---
> select methods from a class and build a mixin template for them
> with interface extraction this would allow extracting interface + functionality 
> blocks
> 
> interface I       { int foo() }
> template I_impl() { int foo(){...} }
> ...
> class C : I { mixin I_impl!() }

All good ideas! They'll be there.

> generate a explicit specialization of a template from a general one
> 
> template T(U) { U foo; }
> 
> becomes, for int
> 
> template T(U) { U foo; }
> template T(U : int) { int foo; }
> 

I don't really understand what you mean here and why this would be useful. Can you elaborate, please?



More information about the Digitalmars-d mailing list