Skip to content

disallow scalars in cat? #34395

@JeffBezanson

Description

@JeffBezanson

The cat functions are currently very permissive:

julia> vcat([1], :a)
2-element Array{Any,1}:
 1
  :a

This can lead to confusion when non-array collections are passed and mysteriously treated as scalars, e.g.

julia> vcat([1], keys(Dict()))
2-element Array{Any,1}:
 1
  Any[]

So a similar situation to what we had before in broadcast. We should make the corresponding change to cat and require all arguments to be array-like somehow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    arrays[a, r, r, a, y, s]breakingThis change will break codeneeds decisionA decision on this change is needed

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions