On Tue, 5 Oct 1999, Alex Ferguson wrote:

> > 3) Encapsulation.  You can't have private and protected members.  Some
> > of this can be done using modules.  However it is more work.
> 
> What exactly can't be done with classes, and how, substantively, is
> it more work?

class Foo
  private: -- only members of the Foo class can see this
    ...
  protected: -- only mebers of the Foo class and those derived from foo
             -- can see it.
  public: -- anyone can see it

> > 4) Cleaner more natural syntax.
> 
> More like C++, you mean?

Or Java.  Although many OO things can be done in Haskell C++ and Java
syntax is more natural more doing OO.

---
Kevin Atkinson
[EMAIL PROTECTED]
http://metalab.unc.edu/kevina/




Reply via email to