Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Public variables: VFP vs VB
Message
From
25/12/2000 21:27:36
 
 
To
25/12/2000 07:24:39
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00456729
Message ID:
00456773
Views:
18
>>>>>>>>>>>>>>>>>
Throughout the processs of learning VFP I see lots of emphasis placed on not using PUBLIC variables. On the other hand, as I read up on Visual Basic I see the exact opposite. It seems commonplace to use public variables, methods, properties, etc.
Can someone tell me why this is so.
>>>>>>>>>>>>>>>>>

VFP6 is OOP. VB6 is not. Should VB developers use them just because they don't do OOP? No! But they do because it's easier to program that way.

Public variables break encapsulation. They are hard to debug as one module can change the value and another one will inadvertently use that changed value although it was not intended.

I believe the VB people that make the jump to VB.Net which will be OOP will change that, as we had to do when we changed from FPD/FPW2.6


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Reply
Map
View

Click here to load this message in the networking platform