Roger-luo / Configurations.jl

Options & Configurations made easy.
https://configurations.rogerluo.dev/stable
MIT License
80 stars 12 forks source link

Remove the default overloading of Base.show? #46

Closed Roger-luo closed 3 years ago

Roger-luo commented 3 years ago

currently configurations implements a poorman version of pretty printing for option types to improve readability, but I'm thinking if we should remove that now, since now there is https://github.com/Roger-luo/GarishPrint.jl which provides much better functionality without depending on anything.

I think by default the option types are usually used as a structural and composable object for preference and settings, so pretty printing is probably not often needed, and forward Base.show to GarishPrint.pprint seems very simple. So I'm thinking removing the auto overloading which also resolves the printing issue in Pluto (since now Pluto will just use its own printing)

But I want to hear @fonsp opinion on this when you have time, since Pluto is one of the major downstream package of this.

fonsp commented 3 years ago

Pluto users don't use the pretty-printing feature of Configurations very much, so it seems fine to remove. It would also make Configurations-inside-Pluto display using Pluto's built-in system, which would be nice!

GarishPrint.jl look great, this seems like something I want to enable for every REPL session, like OhMyREPL.jl. i.e. I think that pretty-printing general objects should be the task of the environment (REPL/Pluto), not the package itself

Roger-luo commented 3 years ago

@fonsp you mean like this? ;-) I can submit a PR to OhMyREPL after GarishPrint get registered

image

fonsp commented 3 years ago

Very cool!