Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Procedure file vs separate programs
Message
From
10/04/2005 11:13:42
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
09/04/2005 21:27:40
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01001904
Message ID:
01003202
Views:
25
>I know you received different opinion, and it was wrong. Look at the whole picture for a second. Say I join your team and I want to find a function referred to by some piece of code. Without asking for help, having to look in documentation or doing a text search, how do I look at that function's code? If it was a separate PRG, it's a no-brainer. Can't get much easier than that. Spaghetti code will be spaghetti no matter where the routines are. I believe it will be messier spaghetti when two copies of the same function exist in two different procedure files. That is an accident I'd rather avoid.

Just one thing to add to this.

The "having too many files in a directory makes it slower" idea. It was true under DOS, and in the times when Fox couldn't make an exe. Within an exe, it's the same - Fox will find the function no matter what, except if there's more than one, then the order of Set Procedure To matters. But then, within an exe, there's no need to Set Procedure, as all of the files are inside the exe.

And even during development, when there's the need to look up a file in the directory - this is not DOS, the directory isn't searched sequentially anymore. It's either indexed or cached or whatever. There's no significant speed penalty anymore. We can have thousands of files if we want. And it's only the first time that Fox needs to search for it - it's cached afterwards.

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