Skip to content

Commit fe6b1cf

Browse files
committed
Revise .' deprecation message and add .'-dep TODOs to base/deprecated.jl.
1 parent 09f7213 commit fe6b1cf

File tree

2 files changed

+22
-12
lines changed

2 files changed

+22
-12
lines changed

base/deprecated.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,6 +1740,13 @@ end
17401740
@deprecate RowVector{T}(n::Tuple{Int,Int}) where {T} RowVector{T}(uninitialized, n)
17411741
end
17421742

1743+
# TODOs re. .' deprecation
1744+
# (1) remove .' deprecation from src/julia-syntax.scm around line 2346
1745+
# (2) remove .' documentation from base/docs/basedocs.jl around line 255
1746+
# (3) remove .'-involving code from base/show.jl around line 1277
1747+
# (4) remove .'-involving test from test/deprecation_exec.jl around line 178
1748+
# (5) remove .'-related code from src/ast.scm and src/julia-parser.scm
1749+
17431750
# A[ct]_(mul|ldiv|rdiv)_B[ct][!] methods from base/operators.jl, to deprecate
17441751
@deprecate Ac_ldiv_Bt(a,b) (\)(adjoint(a), transpose(b))
17451752
@deprecate At_ldiv_Bt(a,b) (\)(transpose(a), transpose(b))

src/julia-syntax.scm

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2349,28 +2349,31 @@
23492349
"operations, for example `A.'*B` lowering to `At_mul_B(A, B)`, "
23502350
"`A\\B.'` lowering to `A_ldiv_Bt(A, B)`, and `A.'/B.'` "
23512351
"lowering to `At_rdiv_Bt(A, B)`, has been removed "
2352-
"in favor of a lazy `Transpose` wrapper type and "
2352+
"in favor of lazy transposition via `transpose`, "
2353+
"a corresponding lazy `Transpose` wrapper type, and "
23532354
"dispatch on that type. Two rewrites for `A.'` for "
2354-
"matrix `A` exist: eager or materializing `transpose(A)`, "
2355-
"which constructs a freshly allocated matrix of `A`'s type "
2356-
"and containing the transpose of `A`, and lazy "
2357-
"`Transpose(A)`, which wraps `A` in a `Transpose` "
2358-
"view type. Which rewrite is appropriate depends on "
2355+
"matrix `A` exist: "
2356+
"`transpose(A)`, which yields a lazily transposed "
2357+
"version of `A` (often by wrapping in the `Transpose` type), "
2358+
"and `copy(transpose(A))` which lazily transposes "
2359+
"`A` as above and then materializes that lazily "
2360+
"transposed `A` into a freshly allocated matrix "
2361+
"of `A`'s type. Which rewrite is appropriate depends on "
23592362
"context: If `A.'` appears in a multiplication, "
23602363
"left-division, or right-division operation that "
23612364
"was formerly specially lowered to an `A_mul_B`-like "
2362-
"call, then the lazy `Tranpose(A)` is the correct "
2365+
"call, then the lazy `tranpose(A)` is the correct "
23632366
"replacement and will result in dispatch to a method "
23642367
"equivalent to the former `A_mul_B`-like call. For "
23652368
"example, `A.'*B`, formerly yielding `At_mul_B(A, B)`, "
2366-
"should be rewritten `Transpose(A)*B`, which will "
2369+
"should be rewritten `transpose(A)*B`, which will "
23672370
"dispatch to a method equivalent to the former "
23682371
"`At_mul_B(A, B)` method. If `A.'` appears outside "
2369-
"such an operation, then `transpose(A)` is the "
2370-
"correct rewrite. For vector `A`, `A.'` already "
2371-
"transposed lazily to a `RowVector`, so `Transpose(A)`. "
2372+
"such an operation, then `copy(transpose(A))` is the "
2373+
"functionally equivalent rewrite. For vector `A`, `A.'` already "
2374+
"transposed lazily to a `RowVector`, so `transpose(A)`, "
23722375
"which now yields a `Transpose`-wrapped vector "
2373-
"behaviorally equivalent to the former `RowVector` "
2376+
"behaviorally equivalent to the former `RowVector`, "
23742377
"is always the correct rewrite for vectors. For "
23752378
"more information, see issue #5332 on Julia's "
23762379
"issue tracker on GitHub." #\newline) #f)

0 commit comments

Comments
 (0)