Updated Destructors (rest)

This commit is contained in:
Andreas Rumpf 2019-06-02 08:17:37 +02:00
parent b801e8b30b
commit 8560058042
1 changed files with 2 additions and 0 deletions

View File

@ -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"?)
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``.