On Friday, December 18, 2015 at 7:24:38 PM UTC-5, Ethan Anderes wrote: > > My understanding is that an expression like tmp .-= 4z generates two > temporary arrays. It expands to tmp = tmp .- 4z so one temporary array > for 4z then one for tmp .- 4z (the final tmp rebinds to that). >
.-= is not a valid syntax. The original poster was suggesting that it would do in-place subtraction, so it wouldn't create a temporary array. "tmp -= 4z" is the current syntax in Julia, and indeed expands to "tmp = tmp - 4z", which generates two new arrays (one for 4z and another one for the result of the subtraction). > >
