Chris Shiflett wrote:
> --- Andu <[EMAIL PROTECTED]> wrote: > > This may show my ignorance or my refusal to take for granted > > something I don't fully understand but I have a hard time > > figuring out the advantage of using classes as opposed to just > > functions. > > They are entirely different. While OO fans will find my over-simplification > disgusting, a class is basically a way to associate data with the functions > that manipulate that data. > > Chris > AKA 'encapsulation' Of course you can achieve this by making a programmer imposed requirement saying that global variable X can only be altered by function Xf(), or Typedef X can only be altered by functions Xf(), but OO make this more of a hard requirement, and not the programmer imposed or 'soft' requirement. Of course there are other ideas like polymorphism and inheritance and such. Just google for Object oriented programming, and read some of the numerous exposes on the subject to get a general idea. http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=object+oriented+programming -Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php