>>>>>>>>>>>>>>>>>
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