Merge pull request #1924 from daniel-kullmann/doc-fix1
doc/tut2.txt: clarified usage of static/dynamic binding
This commit is contained in:
commit
8c8c48e36a
1 changed files with 2 additions and 2 deletions
|
|
@ -304,8 +304,8 @@ Procedures always use static dispatch. For dynamic dispatch replace the
|
||||||
echo eval(newPlus(newPlus(newLit(1), newLit(2)), newLit(4)))
|
echo eval(newPlus(newPlus(newLit(1), newLit(2)), newLit(4)))
|
||||||
|
|
||||||
Note that in the example the constructors ``newLit`` and ``newPlus`` are procs
|
Note that in the example the constructors ``newLit`` and ``newPlus`` are procs
|
||||||
because they should use static binding, but ``eval`` is a method because it
|
because it makes more sense for them to use static binding, but ``eval`` is a
|
||||||
requires dynamic binding.
|
method because it requires dynamic binding.
|
||||||
|
|
||||||
In a multi-method all parameters that have an object type are used for the
|
In a multi-method all parameters that have an object type are used for the
|
||||||
dispatching:
|
dispatching:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue