Fix typos
This commit is contained in:
parent
c95f6f117a
commit
657dca5c3b
81 changed files with 126 additions and 126 deletions
|
|
@ -37,7 +37,7 @@ Object Oriented Programming
|
|||
While Nim's support for object oriented programming (OOP) is minimalistic,
|
||||
powerful OOP techniques can be used. OOP is seen as *one* way to design a
|
||||
program, not *the only* way. Often a procedural approach leads to simpler
|
||||
and more efficient code. In particular, prefering composition over inheritance
|
||||
and more efficient code. In particular, preferring composition over inheritance
|
||||
is often the better design.
|
||||
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ An example:
|
|||
|
||||
.. code-block:: nim
|
||||
|
||||
# This is an example how an abstract syntax tree could be modeled in Nim
|
||||
# This is an example how an abstract syntax tree could be modelled in Nim
|
||||
type
|
||||
NodeKind = enum # the different node types
|
||||
nkInt, # a leaf with an integer value
|
||||
|
|
@ -335,7 +335,7 @@ As the example demonstrates, invocation of a multi-method cannot be ambiguous:
|
|||
Collide 2 is preferred over collide 1 because the resolution works from left to
|
||||
right. Thus ``Unit, Thing`` is preferred over ``Thing, Unit``.
|
||||
|
||||
**Perfomance note**: Nim does not produce a virtual method table, but
|
||||
**Performance note**: Nim does not produce a virtual method table, but
|
||||
generates dispatch trees. This avoids the expensive indirect branch for method
|
||||
calls and enables inlining. However, other optimizations like compile time
|
||||
evaluation or dead code elimination do not work with methods.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue