A simple query about implementing CLOS 
Author Message
 A simple query about implementing CLOS

Try
    http://www.*-*-*.com/ #clos

The CLOS Repository at CMU looks good.

- nick

Quote:

> I've been given a task to determine how to implement a object system in lisp.
> I've searched around the net to references about CLOS but have only been able
> to find references about how to use CLOS not how its been implemented.
> Knowing almost next to nothing about CLOS I could be missing the obvious.
> Can anyone point me at some online resources that describe simple
> implementations about how a object system (e.g. clos ) can be implemented in
> lisp or some usefull pointers about how to do it.



Fri, 12 Oct 2001 03:00:00 GMT  
 A simple query about implementing CLOS

Quote:

> I've been given a task to determine how to implement a object system in lisp.

(use-package 'common-lisp)  ;Ignore this.  It's a CL in-joke.

Quote:
> I've searched around the net to references about CLOS but have only been able
> to find references about how to use CLOS not how its been implemented.

I don't understand what you mean.  Common Lisp comes with CLOS built in.
Are you saying you want to implement CLOS in a Lisp but not in a Lisp
that has CLOS already?  Is this a class exercise or are you implementing
a new Common Lisp?  The answers would be very different.

Quote:
> Knowing almost next to nothing about CLOS I could be missing the obvious.

The implementation of CLOS is not specified.  The implementation of
almost nothing in Lisp is specified.  Lisp is not about
implementation, it is about contract.  The definition of Lisp dialects
are customarily specified in terms of what contract a function must
satisfy, not what data layout or operational technique must be
employed to yield a successful satisfaction of that contract.

Quote:
> Can anyone point me at some online resources that describe simple
> about how a object system (e.g. clos ) can be implemented in lisp or
> some usefull pointers about how to do it.

People will have a lot easier time answering this question usefully if
you say more about your goal.  There are publicly available
implementations, but they are not necessarily simple.  For more
information, go to the Association of Lisp Users (ALU) web site for a
list of implementations and their use restrictions.  There are a number
of them there.  
 http://www.elwoodcorp.com/alu/
is the interim home page for the ALU.

In my personal opinion, which you can argue is reflected in the design
of the language, small and easy to describe and implement languages
make large and unwieldy programs.  The Common Lisp specification is
not small, and even the part about the object system is not small.
I think that makes the system easier to use when you get done building
it.  But it isn't a claim that it's easy to build an efficient
implementation.  Another useful resource for understanding the object
system is Gregor Kiczales' The Art of the Metaobject Protocol, usually
referred to informally as AMOP.  It's a softcover book you can probably
find at a bookstore or at Amazon.com.  I recommend looking through it at
a bookstore first, since depending on your need you might find it's
more advanced than what you're looking for.  But the MOP (the meta-object
protocol) is the conceptual architectural framework behind CLOS.
CLOS does not require you to implement things as the MOP describes,
but in practice many implementations do and absent a better theory
you should also.

You can probably find a public implementation of all of this that you
can use, but that may defeat your purpose.  If your purpose is to
learn, finding all the code already written may or may not be useful
to you (depending on your taste for reading code).  If your purpose is
to get something done in CLOS, there are already good implementations
out there.



Fri, 12 Oct 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. implementing links between two classes in CLOS (without inheritance)

2. implementing links between two classes in CLOS (without inheritance)

3. Query: how to implement single inheritance

4. (Second try) Query: other ways to implement encapsulated objects

5. Simple CLOS Utility

6. MySQL query in PHP: Not query zero amounts also removes null amounts from query

7. PHP+MySQL - How to implement simple search engine?

8. QUESTION: simple prolog interpreter implemented in scheme?

9. wxPython - Simple implement (for Newbie)

10. Implementing a simple network protocol

11. HELP!!! Try to implement simple script into Tcl

12. Simple Query

 

 
Powered by phpBB® Forum Software