You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2013/07/06 16:32:43 UTC

[lucy-commits] [1/3] git commit: refs/heads/master - Check for inert classes in inheritance chain

Updated Branches:
  refs/heads/master f74524e6c -> 6f661d5d2


Check for inert classes in inheritance chain


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/d339697f
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/d339697f
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/d339697f

Branch: refs/heads/master
Commit: d339697f552620607b114ce61747975193444e20
Parents: f74524e
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Tue Jul 2 18:34:18 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sat Jul 6 13:01:19 2013 +0200

----------------------------------------------------------------------
 clownfish/compiler/perl/t/401-class.t | 27 ++++++++++++++++++++++++++-
 clownfish/compiler/src/CFCClass.c     | 12 +++++++++++-
 2 files changed, 37 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/d339697f/clownfish/compiler/perl/t/401-class.t
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/t/401-class.t b/clownfish/compiler/perl/t/401-class.t
index 5e37cc3..b45f024 100644
--- a/clownfish/compiler/perl/t/401-class.t
+++ b/clownfish/compiler/perl/t/401-class.t
@@ -16,7 +16,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 54;
+use Test::More tests => 56;
 use Clownfish::CFC::Model::Class;
 use Clownfish::CFC::Parser;
 
@@ -250,3 +250,28 @@ $class_content = qq|
     }|;
 $class = $parser->parse($class_content);
 ok( $class->final, "final class_declaration" );
+
+Clownfish::CFC::Model::Class->_clear_registry();
+
+{
+    eval {
+        my $class = Clownfish::CFC::Model::Class->create(%foo_create_args);
+        my $inert = Clownfish::CFC::Model::Class->create(%inert_args);
+        $class->add_child($inert);
+    };
+    like( $@, qr/inert class/i, "inert class can't inherit" );
+
+    Clownfish::CFC::Model::Class->_clear_registry();
+}
+
+{
+    eval {
+        my $class = Clownfish::CFC::Model::Class->create(%foo_create_args);
+        my $inert = Clownfish::CFC::Model::Class->create(%inert_args);
+        $inert->add_child($class);
+    };
+    like( $@, qr/inert class/i, "can't inherit from inert class" );
+
+    Clownfish::CFC::Model::Class->_clear_registry();
+}
+

http://git-wip-us.apache.org/repos/asf/lucy/blob/d339697f/clownfish/compiler/src/CFCClass.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCClass.c b/clownfish/compiler/src/CFCClass.c
index 2476071..7e6767b 100644
--- a/clownfish/compiler/src/CFCClass.c
+++ b/clownfish/compiler/src/CFCClass.c
@@ -347,7 +347,17 @@ CFCClass_clear_registry(void) {
 void
 CFCClass_add_child(CFCClass *self, CFCClass *child) {
     CFCUTIL_NULL_CHECK(child);
-    if (self->tree_grown) { CFCUtil_die("Can't call add_child after grow_tree"); }
+    if (self->tree_grown) {
+        CFCUtil_die("Can't call add_child after grow_tree");
+    }
+    if (self->is_inert) {
+        CFCUtil_die("Can't inherit from inert class %s",
+                    CFCClass_get_class_name(self));
+    }
+    if (child->is_inert) {
+        CFCUtil_die("Inert class %s can't inherit",
+                    CFCClass_get_class_name(child));
+    }
     self->num_kids++;
     size_t size = (self->num_kids + 1) * sizeof(CFCClass*);
     self->children = (CFCClass**)REALLOCATE(self->children, size);


[lucy-commits] [3/3] git commit: refs/heads/master - Work on Clownfish documentation

Posted by nw...@apache.org.
Work on Clownfish documentation

* The "Clownfish" parcel
* Inline functions
* SUPER_METHOD_PTR
* Default parameter values
* Object life cycle


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/6f661d5d
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/6f661d5d
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/6f661d5d

Branch: refs/heads/master
Commit: 6f661d5d2244194423cd9b08689cba98c9f06b5e
Parents: 2b523ca
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sat Jul 6 16:28:49 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sat Jul 6 16:29:34 2013 +0200

----------------------------------------------------------------------
 clownfish/runtime/perl/lib/Clownfish.pod | 123 +++++++++++++++++++++++---
 1 file changed, 112 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/6f661d5d/clownfish/runtime/perl/lib/Clownfish.pod
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/lib/Clownfish.pod b/clownfish/runtime/perl/lib/Clownfish.pod
index 49031c7..6b8507d 100644
--- a/clownfish/runtime/perl/lib/Clownfish.pod
+++ b/clownfish/runtime/perl/lib/Clownfish.pod
@@ -174,6 +174,12 @@ For object types in Clownfish header files, prefixes of class structs can
 also be omitted unless multiple parcels declare classes with the same last
 component of the class name.
 
+=head3 The "Clownfish" parcel
+
+The Clownfish runtime classes live in a parcel named C<Clownfish> with
+nickname C<Cfish>. Consequently, the short name macro is named
+C<CFISH_USE_SHORT_NAMES>.
+
 =head2 Declaring classes
 
 Classes are declared in Clownfish header files using a declaration of the
@@ -359,7 +365,9 @@ names. So the implementation will look like:
 
 =head3 Inline functions
 
-TODO
+Inert functions can be inline. They should be defined as static inline
+functions in a C block in the Clownfish header file. The macro C<CFISH_INLINE>
+expands to the C compiler's inline keyword and should be used for portability.
 
 =head3 Methods
 
@@ -426,11 +434,17 @@ a pointer to the Clownfish::VTable object of the method's class, the second is
 the unshortened name of the method wrapper. If short names for the Clownfish
 parcel are used, the macro is also available under the name C<METHOD_PTR>.
 
+To lookup methods from a superclass, there's a macro C<CFISH_SUPER_METHOD_PTR>
+with the same parameters.
+
 Example using short names:
 
     VisGraph_Add_Node_t add_node
         = METHOD_PTR(PFIND_VISIBILITYGRAPH, Pfind_VisGraph_Add_Node);
 
+    VisGraph_Add_Node_t super_add_node
+        = SUPER_METHOD_PTR(PFIND_VISIBILITYGRAPH, Pfind_VisGraph_Add_Node);
+
 =head3 Abstract methods
 
 For abstract methods, the Clownfish compiler generates an implementing function
@@ -470,7 +484,10 @@ reference count after the call.
 
 =head3 Default parameter values
 
-TODO
+Default parameter values can be given as integer, float, or string literals.
+The values C<true>, C<false>, and C<NULL> are also supported. The default
+values are only used by the host language bindings. They're not supported
+when calling a function from C.
 
 =head2 C blocks
 
@@ -489,23 +506,107 @@ Example:
 
     __END_C__
 
-=head2 Memory management
+=head2 Object life cycle
 
-TODO: Reference counting
+=head3 Object creation
 
-TODO: INCREF/DECREF macros
+Objects are allocated by invoking the C<Make_Obj> method on a class's
+Clownfish::VTable object.
 
-TODO: Destroy method
+Any inert function can be used to construct objects from C. But to support
+inheritance and object creation from the host language, Clownfish classes
+need a separate function to initialize objects. The initializer must take a
+pointer to an object as first argument and return a pointer to the same
+object. If the parent class has an initializer, it should be called first by
+the subclass's initializer.
 
-=head2 Constructors
+By convention, the standard constructor is named C<new>. If a class has an
+inert function named C<init>, it is used as initializer to create a host
+language constructor by default.
 
-TODO
+Example:
+
+    /* Clownfish header */
+
+    class Vehicle {
+        double max_speed;
+
+        inert Vehicle*
+        init(Vehicle *self, double max_speed);
+    }
 
-=head2 Inheritance
+    class Train inherits Vehicle {
+        double track_gauge;
+
+        inert incremented Train*
+        new(double max_speed, double track_gauge);
+
+        inert Train*
+        init(Train *self, double max_speed, double track_gauge);
+    }
+
+    /* Implementation */
+
+    Train*
+    Train_new(double max_speed, double track_gauge) {
+        Train *self = (Train*)VTable_Make_Obj(TRAIN);
+        return Train_init(self, max_speed, track_gauge);
+    }
+
+    Train*
+    Train_init(Train *self, double max_speed, double track_gauge) {
+        Vehicle_init((Vehicle*)self, max_speed);
+        self->track_gauge = track_gauge;
+        return self;
+    }
 
-TODO: init functions
+=head3 Reference counting
 
-TODO: SUPER_METHOD_PTR, SUPER_DESTROY
+Clownfish uses reference counting for memory management. Objects are created
+with a reference count of 1. There are two macros C<CFISH_INCREF> and
+C<CFISH_DECREF> to increment and decrement reference counts. If short names
+for the Clownfish parcel are enabled, the macros can be abbreviated to
+C<INCREF> and C<DECREF>. Both macros take a pointer to an object as argument.
+NULL pointers are allowed. C<CFISH_INCREF> returns a pointer to the object.
+This value might differ from the passed-in pointer in some cases. So if a
+reference is retained, the pointer returned from C<CFISH_INCREF> should be
+used. C<CFISH_DECREF> returns the modified reference count.
+
+Examples:
+
+    self->value = INCREF(arg);
+
+    DECREF(object);
+
+=head3 Object destruction
+
+If an object's reference count reaches 0, its C<Destroy> method is called.
+This public method takes no arguments besides C<self> and has no return value.
+It should release the resources held by the object and finally call the
+C<Destroy> method of the superclass via the C<CFISH_SUPER_DESTROY> macro with
+short name C<SUPER_DESTROY>. This macro takes the C<self> pointer as first
+argument and a pointer to the object's Clownfish::VTable as second argument.
+The C<Destroy> method of the Clownfish::Obj class will eventually free the
+object struct.
+
+Example:
+
+    /* Clownfish header */
+
+    class Path {
+        VArray *nodes;
+
+        public void
+        Destroy(Path *self);
+    }
+
+    /* Implementation */
+
+    void
+    Path_destroy(Path *self) {
+        DECREF(self->nodes);
+        SUPER_DESTROY(self, PATH);
+    }
 
 =head1 COPYRIGHT
 


[lucy-commits] [2/3] git commit: refs/heads/master - Inherit from Clownfish::Obj by default

Posted by nw...@apache.org.
Inherit from Clownfish::Obj by default


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/2b523ca7
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/2b523ca7
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/2b523ca7

Branch: refs/heads/master
Commit: 2b523ca72d3baf21e2db32ac3771ad062bba0735
Parents: d339697
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Tue Jul 2 19:43:54 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sat Jul 6 13:01:50 2013 +0200

----------------------------------------------------------------------
 clownfish/compiler/c/t/cfbase/Animal.cfh    |  2 ++
 clownfish/compiler/perl/t/401-class.t       |  5 ++++-
 clownfish/compiler/perl/t/500-hierarchy.t   | 11 ++++++-----
 clownfish/compiler/perl/t/501-include_dir.t |  8 ++++----
 clownfish/compiler/perl/t/502-clash.t       |  4 +++-
 clownfish/compiler/perl/t/cfbase/Animal.cfh |  2 ++
 clownfish/compiler/src/CFCClass.c           |  6 ++++++
 clownfish/compiler/src/CFCTestHierarchy.c   |  9 +++++----
 clownfish/runtime/perl/lib/Clownfish.pod    |  4 ++--
 9 files changed, 34 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/2b523ca7/clownfish/compiler/c/t/cfbase/Animal.cfh
----------------------------------------------------------------------
diff --git a/clownfish/compiler/c/t/cfbase/Animal.cfh b/clownfish/compiler/c/t/cfbase/Animal.cfh
index a4d689a..46130b7 100644
--- a/clownfish/compiler/c/t/cfbase/Animal.cfh
+++ b/clownfish/compiler/c/t/cfbase/Animal.cfh
@@ -16,4 +16,6 @@
 
 parcel Animal;
 
+class Clownfish::Obj { }
+
 abstract class Animal { }

http://git-wip-us.apache.org/repos/asf/lucy/blob/2b523ca7/clownfish/compiler/perl/t/401-class.t
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/t/401-class.t b/clownfish/compiler/perl/t/401-class.t
index b45f024..6cf51a2 100644
--- a/clownfish/compiler/perl/t/401-class.t
+++ b/clownfish/compiler/perl/t/401-class.t
@@ -16,7 +16,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 56;
+use Test::More tests => 57;
 use Clownfish::CFC::Model::Class;
 use Clownfish::CFC::Parser;
 
@@ -167,6 +167,9 @@ is( $parser->parse("class Fu::$_ inherits $_ { }")->get_parent_class_name,
     $_, "class_inheritance: $_" )
     for ( 'Fooble', 'Foo::FooJr::FooIII' );
 
+is( $parser->parse("class MissingInherits { }")->get_parent_class_name,
+    "Clownfish::Obj", "class inherits from Clownfish::Obj by default" );
+
 my $class_content
     = 'public class Foo::Foodie cnick Foodie inherits Foo { int num; }';
 my $class = $parser->parse($class_content);

http://git-wip-us.apache.org/repos/asf/lucy/blob/2b523ca7/clownfish/compiler/perl/t/500-hierarchy.t
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/t/500-hierarchy.t b/clownfish/compiler/perl/t/500-hierarchy.t
index 4866731..6c2a10c 100644
--- a/clownfish/compiler/perl/t/500-hierarchy.t
+++ b/clownfish/compiler/perl/t/500-hierarchy.t
@@ -16,7 +16,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 20;
+use Test::More tests => 21;
 
 use Clownfish::CFC::Model::Hierarchy;
 use Clownfish::CFC::Util qw( a_isa_b );
@@ -59,9 +59,10 @@ my %files;
 for my $file (@files) {
     die "not a File" unless isa_ok( $file, "Clownfish::CFC::Model::File" );
     ok( !$file->get_modified, "start off not modified" );
-    my ($class)
-        = grep { a_isa_b( $_, "Clownfish::CFC::Model::Class" ) }
-        @{ $file->blocks };
+    my ($class) = grep {
+        a_isa_b( $_, "Clownfish::CFC::Model::Class" )
+        && $_->get_class_name ne 'Clownfish::Obj'
+    } @{ $file->blocks };
     die "no class" unless $class;
     $files{ $class->get_class_name } = $file;
 }
@@ -70,7 +71,7 @@ my $dog    = $files{'Animal::Dog'}  or die "No Dog";
 my $util   = $files{'Animal::Util'} or die "No Util";
 
 my $classes = $hierarchy->ordered_classes;
-is( scalar @$classes, 3, "all classes" );
+is( scalar @$classes, 4, "all classes" );
 for my $class (@$classes) {
     die "not a Class" unless isa_ok( $class, "Clownfish::CFC::Model::Class" );
 }

http://git-wip-us.apache.org/repos/asf/lucy/blob/2b523ca7/clownfish/compiler/perl/t/501-include_dir.t
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/t/501-include_dir.t b/clownfish/compiler/perl/t/501-include_dir.t
index 00b735c..8f16f4a 100644
--- a/clownfish/compiler/perl/t/501-include_dir.t
+++ b/clownfish/compiler/perl/t/501-include_dir.t
@@ -16,7 +16,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 21;
+use Test::More tests => 24;
 
 use Clownfish::CFC::Model::Hierarchy;
 use File::Spec::Functions qw( catdir catfile splitpath );
@@ -41,7 +41,7 @@ my $dest_dir = catdir(qw( t cfdest ));
     $hierarchy->build;
 
     my $classes = $hierarchy->ordered_classes;
-    is( scalar @$classes, 4, "all classes" );
+    is( scalar @$classes, 5, "all classes" );
     my $num_included = 0;
     for my $class (@$classes) {
         die "not a Class"
@@ -63,7 +63,7 @@ my $dest_dir = catdir(qw( t cfdest ));
 
         is( $included, $expect, "included" );
     }
-    is( $num_included, 3, "included class count" );
+    is( $num_included, 4, "included class count" );
 
     Clownfish::CFC::Model::Class->_clear_registry();
     Clownfish::CFC::Model::Parcel->reap_singletons();
@@ -83,7 +83,7 @@ my $dest_dir = catdir(qw( t cfdest ));
     $hierarchy->build;
 
     my $classes = $hierarchy->ordered_classes;
-    is( scalar @$classes, 4, "all classes" );
+    is( scalar @$classes, 5, "all classes" );
     for my $class (@$classes) {
         die "not a Class" unless isa_ok( $class, "Clownfish::CFC::Model::Class" );
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/2b523ca7/clownfish/compiler/perl/t/502-clash.t
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/t/502-clash.t b/clownfish/compiler/perl/t/502-clash.t
index 85df4d0..ae64da1 100644
--- a/clownfish/compiler/perl/t/502-clash.t
+++ b/clownfish/compiler/perl/t/502-clash.t
@@ -67,7 +67,7 @@ my $file_clash_dir  = catdir(qw( t cfclash file ));
     $hierarchy->build;
 
     my $classes = $hierarchy->ordered_classes;
-    is( scalar @$classes, 3, "source/include filename clash" );
+    is( scalar @$classes, 4, "source/include filename clash" );
 
     Clownfish::CFC::Model::Class->_clear_registry();
     Clownfish::CFC::Model::Parcel->reap_singletons();
@@ -83,6 +83,7 @@ my $bar_dir = catdir(qw( t cfclash bar ));
 
     $hierarchy->add_source_dir($foo_dir);
     $hierarchy->add_include_dir($bar_dir);
+    $hierarchy->add_include_dir($base_dir);
 
     eval { $hierarchy->build; };
 
@@ -98,6 +99,7 @@ my $bar_dir = catdir(qw( t cfclash bar ));
 
     $hierarchy->add_source_dir($bar_dir);
     $hierarchy->add_include_dir($foo_dir);
+    $hierarchy->add_include_dir($base_dir);
 
     eval { $hierarchy->build; };
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/2b523ca7/clownfish/compiler/perl/t/cfbase/Animal.cfh
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/t/cfbase/Animal.cfh b/clownfish/compiler/perl/t/cfbase/Animal.cfh
index a4d689a..46130b7 100644
--- a/clownfish/compiler/perl/t/cfbase/Animal.cfh
+++ b/clownfish/compiler/perl/t/cfbase/Animal.cfh
@@ -16,4 +16,6 @@
 
 parcel Animal;
 
+class Clownfish::Obj { }
+
 abstract class Animal { }

http://git-wip-us.apache.org/repos/asf/lucy/blob/2b523ca7/clownfish/compiler/src/CFCClass.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCClass.c b/clownfish/compiler/src/CFCClass.c
index 7e6767b..9c90f68 100644
--- a/clownfish/compiler/src/CFCClass.c
+++ b/clownfish/compiler/src/CFCClass.c
@@ -134,6 +134,12 @@ CFCClass_do_create(CFCClass *self, struct CFCParcel *parcel,
     parcel    = parcel    ? parcel    : CFCParcel_default_parcel();
     CFCSymbol_init((CFCSymbol*)self, parcel, exposure, class_name, cnick,
                    micro_sym);
+    if (!is_inert
+        && !parent_class_name
+        && strcmp(class_name, "Clownfish::Obj") != 0
+       ) {
+        parent_class_name = "Clownfish::Obj";
+    }
     self->parent     = NULL;
     self->tree_grown = false;
     self->autocode   = (char*)CALLOCATE(1, sizeof(char));

http://git-wip-us.apache.org/repos/asf/lucy/blob/2b523ca7/clownfish/compiler/src/CFCTestHierarchy.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCTestHierarchy.c b/clownfish/compiler/src/CFCTestHierarchy.c
index c84c836..8941fe2 100644
--- a/clownfish/compiler/src/CFCTestHierarchy.c
+++ b/clownfish/compiler/src/CFCTestHierarchy.c
@@ -53,7 +53,7 @@ S_run_include_tests(CFCTest *test);
 
 const CFCTestBatch CFCTEST_BATCH_HIERARCHY = {
     "Clownfish::CFC::Model::Hierarchy",
-    36,
+    39,
     S_run_tests
 };
 
@@ -114,7 +114,8 @@ S_run_basic_tests(CFCTest *test) {
         OK(test, ordered_classes[0] != NULL, "ordered_classes[0]");
         OK(test, ordered_classes[1] != NULL, "ordered_classes[1]");
         OK(test, ordered_classes[2] != NULL, "ordered_classes[2]");
-        OK(test, ordered_classes[3] == NULL, "all classes");
+        OK(test, ordered_classes[3] != NULL, "ordered_classes[3]");
+        OK(test, ordered_classes[4] == NULL, "all classes");
         FREEMEM(ordered_classes);
     }
 
@@ -188,7 +189,7 @@ S_run_include_tests(CFCTest *test) {
             INT_EQ(test, CFCClass_included(klass), expect_included,
                    "included");
         }
-        INT_EQ(test, num_classes, 4, "class count");
+        INT_EQ(test, num_classes, 5, "class count");
         INT_EQ(test, num_source_classes, 1, "source class count");
         STR_EQ(test, CFCClass_get_class_name(CFCClass_get_parent(rottweiler)),
                "Animal::Dog", "parent of included class");
@@ -217,7 +218,7 @@ S_run_include_tests(CFCTest *test) {
             }
             OK(test, !CFCClass_included(klass), "not included");
         }
-        INT_EQ(test, num_classes, 4, "class count");
+        INT_EQ(test, num_classes, 5, "class count");
         OK(test, rottweiler != NULL, "found rottweiler");
         STR_EQ(test, CFCClass_get_class_name(CFCClass_get_parent(rottweiler)),
                "Animal::Dog", "parent of class from second source");

http://git-wip-us.apache.org/repos/asf/lucy/blob/2b523ca7/clownfish/runtime/perl/lib/Clownfish.pod
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/lib/Clownfish.pod b/clownfish/runtime/perl/lib/Clownfish.pod
index d7d9874..49031c7 100644
--- a/clownfish/runtime/perl/lib/Clownfish.pod
+++ b/clownfish/runtime/perl/lib/Clownfish.pod
@@ -231,8 +231,8 @@ outside of the parcel and must not contain public variables or functions.
 
 Inert classes must contain only inert variables or inert methods, that is,
 neither instance variables nor methods. They must not inherit from another
-class or be inherited from. All other classes (except Clownfish::Obj) must
-inherit from Clownfish::Obj or another class.
+class or be inherited from. Non-inert classes inherit from Clownfish::Obj by
+default.
 
 =head3 Final classes