Re: defclass and defconcept

Thomas Russ <[email protected]> Wed, 22 Aug 2007 09:22:03 -0700
Newsgroups gmane.comp.ai.powerloom
Message-ID <[email protected]>
On Aug 20, 2007, at 8:54 PM, Cameron Ross wrote:

> What is the difference between defclass and defconcept?

DEFCLASS is used to define Stella classes, in other words,  
programming language level classes.

DEFCONCEPT is used to define PowerLoom concepts, a particular kind of  
unary relation.

You would only use DEFCLASS if you want to do Stella programming.   
For PowerLoom, you need to use DEFCONCEPT.


>   Also, what is NON-OBJECT?

 From the documentation string associated with it:

   "A data structure that cannot be a dispatch argument to
    a (real) method, because its type is not accessible at run-time."

This is used by the Stella code translator to identify types that do  
not have a realization in the native object system, and thus cannot  
have proper method dispatch work for it.  Some examples are literals  
like INTEGER, which are not legal dispatch types in Java (int) or C++  
(int) or even Common Lisp (FIXNUM).  So they need to be handled  
specially by the translator.  Currently the only non-objects in  
Stella are all programming language literals such as numbers, boolean  
values and strings.