>Hey guys, thanks for the advice.
>However I think that to dismiss code generation wholesale
>is going to do me more harm than if i'd consider using em.
>I mean, don't all IDEs today use code generators?
VFP doesn't, not in the case of visual classes, forms, and reports. It does, for menus, and RI code. And you can generate code, if you really want.
To do code generation, you need metadata from which you will generate code. In VFP, visual classes, forms, reports are already your metadata, and no code is generated to run them. VFP interprets these metadata directly, no code generated. So it skips one phase that you want to reintroduce.
I've found one good use for generated code nowadays - at runtime, I sometimes generate a script which does something in a loop. I do that when there'd be too many ifs inside the loop; to avoid them, I simply don't generate those that'd be false for all iterations. And then I do execscript().
At design time, I generate some code to get me started - but then I don't keep it generated, i.e. this is not re-entrant. I can't generate the same code again, without damaging what I have done.