[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SOS: Simple Object System

From: Ludovic Courtès
Subject: Re: SOS: Simple Object System
Date: Wed, 24 Sep 2008 18:14:12 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)


"Maciek Godek" <address@hidden> writes:

> The other is that in GOOPS a method is something
> different than what is commonly known in OOP,

The design of GOOPS is based on that of CLOS, so GOOPS is surely
familiar to anyone familiar with the CLOS flavor of OOP.  :-)

See for details.

> because a class doesn't know its methods

It does:

  guile> (length (class-methods <object>))
  $4 = 54

But unlike in C++, Java, etc., a method is not bound to the type of its
first argument: method dispatching is done on all arguments and on the
number of arguments as well.

> There is also another issue concerning the fact that
> methods are available in global namespace

That's not quite true: the namespace, be it for GOOPS methods
("generics" actually) or "regular" Scheme objects, is managed by the
module system.  Thus, it is possible to hide generics (and,
consequently, the methods they contain) from users, simply by not
exporting them from the module where they are defined.

> But the most important feature of OOP that is missed
> in GOOPS (because of global namespace methods) is the lack
> of the clean separation of interface and implementation
> in the way it's done in java, C# and the like.

See above.

Does that lessen your concerns?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]