I updated the code above to be somewhat more reliable. There are some very
weird edge cases and I am not sure how to handle them yet. For instance:
let
a = ("foo", "bar")
b = a
c = a[0]
(d, e) = a
copies in every case.
let
x = "foo"
y = "foo"
a = (x, y)
b = a
c = a0]
(d, e) = a
Copies during the construction of the tuple but only shallow copies after that.
Is there some blog post that explains how nim decides whether or not to copy
and is that information accessible to macros?
