Updated Destructors (rest)
This commit is contained in:
parent
b801e8b30b
commit
8560058042
|
@ -1,3 +1,5 @@
|
||||||
|
**Note**: This document is succeeded by https://github.com/nim-lang/Nim/wiki/Destructors,-2nd-edition
|
||||||
|
|
||||||
This page is a follow-up of https://nim-lang.org/araq/destructors.html and further outlines of where Nim is heading in the future. (Did I hear anyone say "Nim v2"?)
|
This page is a follow-up of https://nim-lang.org/araq/destructors.html and further outlines of where Nim is heading in the future. (Did I hear anyone say "Nim v2"?)
|
||||||
|
|
||||||
Nim's strings and sequences should become "GC-free" implementations and are exemplary for how Nim's core should work. Strings and sequences are value-based that means ``=`` performs a copy (conceptually). In practice many copies can be optimized away (see my blog post). The "optimized" copy is called a "move" and is supported via the type bound operator ``=sink``.
|
Nim's strings and sequences should become "GC-free" implementations and are exemplary for how Nim's core should work. Strings and sequences are value-based that means ``=`` performs a copy (conceptually). In practice many copies can be optimized away (see my blog post). The "optimized" copy is called a "move" and is supported via the type bound operator ``=sink``.
|
||||||
|
|
Loading…
Reference in New Issue