Re:Copying data is wasteful, mutating data is dangerous
by vmchale on Thursday January 09, 2020 @02:03PM
(#22004303)
> It seems like further advances in this space either require giving the compiler a better understanding of what is "actually" shared
In the context of arrays, it helps when programmers use higher-order combinators/functions, e.g. maps.
There is a mutable way to do a map, and an immutable way, and which should be used in the compiled program depends on analysis of where the variable is used.
In the context of arrays, it helps when programmers use higher-order combinators/functions, e.g. maps.
There is a mutable way to do a map, and an immutable way, and which should be used in the compiled program depends on analysis of where the variable is used.