Array + scalar deprecation

The Deprecated section of Julia v0.7.0 Release Notes says:

“Automatically broadcasted + and - for array + scalar, scalar - array, and so-on
have been deprecated due to inconsistency with linear algebra.
Use .+ and .- for these operations instead.”

  1. I do not find the issue # for this.
    Could you point me to there?

  2. Do I remember correctly that this already happened once,
    but then it was reverted?

Issue: Deprecate broadcast behaviour of `+` in favour of adding identity matrices · Issue #22880 · JuliaLang/julia · GitHub

1 Like

This post links to the previous, reverted attempt:

(You can look at the with blame to find out which commit added the news-item:

1 Like

Thanks for the pointers.
They contained what I was looking for:

As I commented in the later PR, what changed is that

now we’ve eliminated most of the implicit broadcasting in favor of dot calls, and dot calls have some performance advantages (when they are combined) so it is not merely a matter of spelling.

I am sure that all aspects were considered well,
and decision time is over.

It is only that typing A.+1 instead of A+1
is not growing on me without a pain.

Unlike Julia 0.5, you now also have to write sqrt.(A) and exp.(A) for the elementwise functions. See this blog article for why we dropped the implicit elementwise syntax.