Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The printing choices in this package are somewhat non-standard
with respect to how Base defines printing, though that is
probably Base's fault for not documenting how these are
supposed to be used properly. In particular, this package
uses the :compact switch to decide between a parseable,
verbose printing and a compact, human-readable printing.
However, these are orthogonal concepts, and the :compact
switch isn't really supposed to switch the parsability.
Parsability vs non-parsibility is the distinction between
show(io::IO, x)
(parseable) andshow(io::IO, MIME"text/plain"(), x)
(non-parseable, pretty for humans). The latter is also
what is used for display in REPL contexts whereas the former
is used for repr.
I would like to suggest that the REPL printing should also
default to the human-readable version. For example, I
wanted to use intervals of units in a package, but the
default output looks very scary for first time Julia users:
Admittedly that is mostly because of the scary Unitful type,
but still. We have better printing, why not use it. After this PR,
the compact printing is used at the REPL: