Is it possible to express a type relationship between arrays with different numbers of dimensions?

I agree — the biggest inelegance IMO is the fact that declaring struct Foo{X <: Any} actually supports using things that aren’t subtype of Any!

julia> struct Foo{X<:Any} end

julia> Foo{1}()

julia> struct Bar{X<:Real} end

julia> Bar{1}()
ERROR: TypeError: in Bar, in X, expected X<:Real, got Int64
 [1] top-level scope at REPL[50]:1

This is of course necessitated by the fact that Foo{X} is the same as Foo{X<:Any}, but it is indeed a wart. It’d be great to support isa sorts of constraints directly some day. It’s a “bug”, but not a very high priority.

In any case, check out Tamas’ PR again — I added a commit there (before I even saw your comment here) that addresses your comment a bit more directly.

I guess that might help out somewhat with what I was asking about. It would definitely be more convenient if the hidden parameters could more deeply buried, so that it’s much less necessary to ever have to worry about their existence. I guess some of that has been discussed before, but with that solution you do still need to worry about the extra type parameters whenever you need to specify a concrete type (building a collection or using it as a field in another struct). Maybe I’m wrong, but it sounds like this would probably have to be baked into the language for avoiding that to really be possible.