Minor change
This commit is contained in:
parent
76049d9729
commit
09e6557f6d
|
@ -29,7 +29,7 @@ Types | Dynamic | Static
|
||||||
Dependent types | - | Partial support
|
Dependent types | - | Partial support
|
||||||
Generics | Duck typing | Yes
|
Generics | Duck typing | Yes
|
||||||
int8/16/32/64 types | No | Yes
|
int8/16/32/64 types | No | Yes
|
||||||
Bigints | Yes (transparently) | Yes (via nimble package)
|
Bigints (arbitrary size) | Yes (transparently) | Yes (via nimble package)
|
||||||
Arrays | Yes | Yes
|
Arrays | Yes | Yes
|
||||||
Bounds-checking | Yes | Yes
|
Bounds-checking | Yes | Yes
|
||||||
Type inference | Duck typing | Yes (extensive support)
|
Type inference | Duck typing | Yes (extensive support)
|
||||||
|
@ -107,8 +107,7 @@ That will return a compilation error, because the objects have different sizes.
|
||||||
|
|
||||||
So, when using inheritance, be sure to inherit using refs, unless you know what you are doing. Also, check out Nim's generic programming capabilities as an alternative to OOP and inheritance.
|
So, when using inheritance, be sure to inherit using refs, unless you know what you are doing. Also, check out Nim's generic programming capabilities as an alternative to OOP and inheritance.
|
||||||
|
|
||||||
|
## From Python to Nim
|
||||||
## Data structures
|
|
||||||
|
|
||||||
### Python tuples
|
### Python tuples
|
||||||
|
|
||||||
|
@ -124,3 +123,8 @@ The Nim set type is faster and memory-efficient.
|
||||||
### Dictionaries
|
### Dictionaries
|
||||||
|
|
||||||
Use [HashSet](http://nim-lang.org/sets.html)
|
Use [HashSet](http://nim-lang.org/sets.html)
|
||||||
|
|
||||||
|
### ABC
|
||||||
|
|
||||||
|
See[this](http://rosettacode.org/wiki/Abstract_type#Nim)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue