> >
> > I second this post! PUBLICs aren't evil by itself, but it is the misusing them that makes them evil. (And I've just realized that I'm paraphrasing the famous "Guns do not kill, people do.")
> >
> > Regards,
> >
> > Ilya
>
>
>
> so do I! thats the main reason I started with that Thread because of:
>
> Even when objects replace the public vars, nothing is done to protect the properties from changes, so there is little benefit.
>
> everything else are just small benefits which you can easely avoid if you care for your PUBL vars :-)
Actually, Thomas, what concerns these people the most about PUBLICs is when you have a team working on the same project. This is where PUBLICs become real menace, especially when one programmer hardcodes the assingment with one value in his part, and another with some other value in her part... then debugging becomes real nightmare on Friday 13th's night...
OTOH, you are right to an extent: encapsulating data with PRIVATE property of a class with Get/Set ain't any protection either, and without Get/Set - such property becomes useless... unless you take out Set and leave only Get and assign this property's value by some other method of that same object.
Regards,
Ilya