Not really from the manual, but from the scattered tips that the masters reveal here in Discourse or SO and that I try to put together. For part of that code snippet see here.
Now, for example, if following the same example I want to print a vector of matrices, the problem occurs again:
julia> [Polar(3, 4.0) Polar(4.0,5.3)] # matrix is printed in compact form
1×2 Matrix{Polar{Float64}}:
3.0ℯ4.0im 4.0ℯ5.3im
julia> [ [Polar(3, 4.0) Polar(4.0,5.3)] ] # but inside a vector it expands
1-element Vector{Matrix{Polar{Float64}}}:
[3.0 * exp(4.0im) 4.0 * exp(5.3im)]
I understand that the outer vector sets the context of the IO and that affects the printing of the inner matrix. Is the solution really to implement, now, a custom vector-of-matrices printing routine? That does not seem to end up with a consistent behavior.
(specifically, it seems that the form of the printing should be define by the immediately upper-level container, but that of course would create issues for customization).
I don’t think defining methods like Base.show(io::IO, ::MIME"text/plain", vv::Vector{Vector{Polar{Float64}}}) is a good idea; Base already defines show for Vector, so this is piracy IIUC, and breaks composability as you pointed out.