>I have two questions:
>
>1) Why are public variable such a horrible thing?
A public variable is a shared space, accesible from all programs. This makes it hard to control your program. Some procedure might unexpectedly do a change, and you will have a hard time finding out which one it was.
>2) If they are as bad as so many developers claim, why are they part of VFP?
In some cases, they are unavoidable. For example, you do need some public variables, to store information about your application in general, accesible from different procedures, forms, etc.
However, since an object can contain many different variables (properties) a single "application object" might be sufficient to store all your global data.
Also, in some cases it is tricky to exchange data between forms; a global variable can be an easy solution. But it is preferable to search for alternative methods.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)