diff options
author | Araq <rumpf_a@web.de> | 2010-11-18 22:26:20 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2010-11-18 22:26:20 +0100 |
commit | adf13aaea379d482ad4289d349a9d475bc2c06a6 (patch) | |
tree | 4c18d447545c35fa7c1f4ce7db566f96db67a080 /doc/tut2.txt | |
parent | 8ee63f98364259b2d1b6c02d050e0efccecbcf9b (diff) | |
download | Nim-adf13aaea379d482ad4289d349a9d475bc2c06a6.tar.gz |
docgen understands and ignores *when false*
Diffstat (limited to 'doc/tut2.txt')
-rwxr-xr-x | doc/tut2.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/tut2.txt b/doc/tut2.txt index a139fb5de..bd9769af3 100755 --- a/doc/tut2.txt +++ b/doc/tut2.txt @@ -75,9 +75,9 @@ 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. -**Note**: Aggregation (*has-a* relation) is often preferable to inheritance +**Note**: Composition (*has-a* relation) is often preferable to inheritance (*is-a* relation) for simple code reuse. Since objects are value types in -Nimrod, aggregation is as efficient as inheritance. +Nimrod, composition is as efficient as inheritance. Mutually recursive types @@ -487,7 +487,7 @@ The example shows a generic binary tree. Depending on context, the brackets are used either to introduce type parameters or to instantiate a generic proc, iterator or type. As the example shows, generics work with overloading: the best match of ``add`` is used. The built-in ``add`` procedure for sequences -is not hidden and used in the ``preorder`` iterator. +is not hidden and is used in the ``preorder`` iterator. Templates |