Josh McFarlane
darsant at gmail.com
Mon Jun 12 16:17:45 CDT 2006
I'd be interested in seeing this instance where an unprotected global variable has to exist. Josh On 6/12/06, DWUTKA at marlow.com <DWUTKA at marlow.com> wrote: > Well Lambert, I'm glad you didn't write the MSDN, because if I had to wade > through this kind of logic to learn what I have, I would probably go back to > being a mechanic. > > First of all, "But not as much of a waste of time as the process of > explaining later on why public members fields have drawbacks.", they don't > have drawbacks, they have limitations, which I explained. I made it very > obvious that a Public declaration is the same as a BASIC Get/Let statement. > BASIC!!!! You can't put logic into a Public declaration, but you can with a > Get/Let statement, which would no longer be a 'BASIC' Get/Let statement. > > Next, "but globals are bad news in any context", not this again. Public > variables are not BUGGY, nor are they 'bad news'. They have a purpose, that > is why they are there in the first place. The are things that you can do > with a public variable that are simply nightmares to try and do without. In > the advanced demo, I will show a method of public declaration which I'd LOVE > to see you duplicate in another manner. > > As far as data encapsulation, look, if you build every class to go far > beyond what you need it for, you're wasting time. I have a pretty flexible > job, but even I don't over-program that much. If all you need is a place > holder for a value, then just put a place holder for the value. Not a lot > of lines, eh? Let's look at that. -- Josh McFarlane "Peace cannot be kept by force. It can only be achieved by understanding." -Albert Einstein