Skip to content

array display is a mess #6117

@StefanKarpinski

Description

@StefanKarpinski

Recent changes to array printing have made it impossible to normally provide show methods for custom array types. The writemime function intercepts printing of arrays, so that if you define a new type, e.g. Bytes <: AbstractVector{Uint8} and then define show(io::IO, b::Bytes), that show method never gets called. This whole situation is a pretty huge mess, imo. There's no good reason for show and writemime for arrays to produce such different results and you certainly shouldn't have to know about or override writemime methods to get a custom array type to show up the way you want it to in the repl.

Metadata

Metadata

Assignees

No one assigned

    Labels

    REPLJulia's REPL (Read Eval Print Loop)ioInvolving the I/O subsystem: libuv, read, write, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions