[plt-scheme] Lightweight object system
On 9/4/07, Dave Griffiths <dave at pawfal.org> wrote:
> > Are you thinking more from a purely technical level, or methodological?
> Maybe both - I had assumed (and I may well assume wrong) that class
> systems technically are implementations of closures.
They are implemented using closures; but you get a lot more out of a
canned object system rather than implementing ad-hoc classes using
closures.
Suppose that you want to be sure that your class implements some
expected functions, so you use interfaces. It makes it easier to find
errors when people change/break stuff. You don't want to have to
reinvent the wheel.