From 053309e60aee1eda594a4817ac8ac2fb8c18fb04 Mon Sep 17 00:00:00 2001 From: "rumpf_a@web.de" <> Date: Wed, 21 Oct 2009 10:20:15 +0200 Subject: version 0.8.2 --- doc/tut2.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'doc/tut2.txt') diff --git a/doc/tut2.txt b/doc/tut2.txt index 4515ffbd5..c81f98e77 100755 --- a/doc/tut2.txt +++ b/doc/tut2.txt @@ -177,8 +177,7 @@ bound to a class. This has disadvantages: * Adding a method to a class the programmer has no control over is impossible or needs ugly workarounds. * Often it is unclear where the method should belong to: Is - ``join`` a string method or an array method? Should the complex - ``vertexCover`` algorithm really be a method of the ``graph`` class? + ``join`` a string method or an array method? Nimrod avoids these problems by not assigning methods to a class. All methods in Nimrod are `multi-methods`:idx:. As we will see later, multi-methods are @@ -206,7 +205,7 @@ for any type: (Another way to look at the method call syntax is that it provides the missing postfix notation.) -So code that looks "pure object oriented" is easy to write: +So "pure object oriented" code is easy to write: .. code-block:: nimrod import strutils @@ -277,7 +276,7 @@ already provides ``v[]`` access. Dynamic dispatch ---------------- -Procedures always use static dispatch. To get dynamic dispatch, replace the +Procedures always use static dispatch. For dynamic dispatch replace the ``proc`` keyword by ``method``: .. code-block:: nimrod -- cgit 1.4.1-2-gfad0