Avoiding unintended copying / Making copying stand out ====================================================== Use a "copy" keyword everwhere where there is a copy? Should this be done at the type level, expression, or both? func f(copy Thing th) -> copy Thing { copy Thing other other = copy th return copy do_stuff(copy th) } Problems: - This performs a shallow copy! That might not be clear to the user! - Is it possible to force deep copying somehow? Is it possible to make it work across modules? - Maybe too much visual noise? Solutions? - Use a stack keyword instead? - Use it on types and parameter expressions only? func f(stack Thing th) -> stack Thing { stack Thing other other = th return do_stuff(stack th) }