Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does a PRG class execute faster than a VCX based class?
Message
From
25/08/2005 23:45:27
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
25/08/2005 21:57:19
Jet Eloriaga
JetSpeed Solutions, Inc.
San Juan, Philippines
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01040117
Message ID:
01044186
Views:
24
>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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform