Skip to content

syntax: separate array concatenation from array construction #7128

@StefanKarpinski

Description

@StefanKarpinski

Much gnashing of teeth derives from the overlap between syntax for array literal construction and array concatenation in Julia – largely inherited from Matlab. Perhaps we should just use a different syntax for block matrix construction entirely. One thought would be this:

| a b
  c d |

This has the advantage of being pretty terse and lightweight. For example, the current idiom of expanding a range into an array is [1:10] which would become |1:10| while [1:10] would construct a one-element array of type UnitRange{Int}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingThis change will break codespeculativeWhether the change will be implemented is speculative

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions