objects with no ancestor are not implicitely final

This commit is contained in:
Araq 2012-08-24 17:33:04 +02:00
commit d17caa86e8
15 changed files with 44 additions and 22 deletions

View file

@ -74,7 +74,11 @@ section.
Inheritance is done with the ``object of`` syntax. Multiple inheritance is
currently not supported. If an object type has no suitable ancestor, ``TObject``
can be used as its ancestor, but this is only a convention.
can be used as its ancestor, but this is only a convention. Objects that have
no ancestor are implicitely ``final``. You can use the ``inheritable`` pragma
to introduce new object roots apart from ``system.TObject``. (This is used
in the GTK wrapper for instance.)
**Note**: Composition (*has-a* relation) is often preferable to inheritance
(*is-a* relation) for simple code reuse. Since objects are value types in