1.10 only required the matrix elements to be a valid semiring, implementing + , *, zero, one.
1.11 requires that A[i] * true is valid code. While this might seem innocent at a first glance, it is not mathematically sensible in any scenario where eltype(A) is some set and +, * are defined as operations such as unions & string concatenation or convex hull & minkowski sums. In my application (which I cannot disclose in detail), I need to use such sets, but also support different array structures (Array, Diagonal, sparse etc.). This makes it really attractive to rely on generic fallbacks and not implement my own version.
The following code is valid in 1.10.x but errors in 1.11:
The reason seems to be that
A * A
uses the five-argumentmul!
internally, which now performs a multiplication byalpha::Bool
instead of checkingisone(alpha)
(https://github.com/JuliaLang/julia/pull/52038/files#diff-a454fe10464022052956170246cb4be7e2e71bc517e02c2ec0a9548fb6aaaf29R791).Essentially:
+
,*
,zero
,one
.A[i] * true
is valid code. While this might seem innocent at a first glance, it is not mathematically sensible in any scenario whereeltype(A)
is some set and+
,*
are defined as operations such as unions & string concatenation or convex hull & minkowski sums. In my application (which I cannot disclose in detail), I need to use such sets, but also support different array structures (Array, Diagonal, sparse etc.). This makes it really attractive to rely on generic fallbacks and not implement my own version.