Making space for a swankier similar #26433
Labels
arrays
[a, r, r, a, y, s]
deprecation
This change introduces or involves a deprecation
speculative
Whether the change will be implemented is speculative
A major task I'd love to accomplish in 1.x is a redesign of
similar
. This has been discussed in oh-so-many issues (primarily #18161, but also #25107), and I don't want to rehash those discussions all that much. Thesimilar
function currently has lots of methods on it, with three "chains" of fallbacks:(Where
::Array
is a stand-in for any object thatsimilar
supports).I'd like to bifurcate this into a value-domain and a type-domain, wherein the type-domain methods become the canonical endpoints. In order to make space for that, though, I believe we'll need to deprecate the second two pairs of chains. Those guys are there to support offset arrays. I believe
similar(f, …)
can be deprecated in favor of just putting methods onf
.similar(Type{<:Array}, ...)
is messier, though, since it feels wrong to haveArray(undef, 2:3, 2:3)
return something that's not anArray
.The text was updated successfully, but these errors were encountered: