Open juhp opened 3 years ago
I'm not necessarily against this, but one problem with adding functions with different features to Text.Pretty.Simple
is that we end up with a combinatorial explosion of functions.
Currently, Text.Pretty.Simple
has functions with these different features:
pPrint
that takes anything Show
able, pPrintString
that takes a String
that has already been show
n, etc)pPrint
vs pHPrint
vs pShow
)pPrint
/ pPrintDarkBg
vs. pPrintLightBg
vs. pPrintNoColor
)pPrint
vs. pPrintOpt
)Even for this existing functionality, I don't think we have all proper combinations of each of these features.
If we added another feature to this matrix (whether or not to print compact), it would cause a bunch of additional functions that need to be added to Text.Pretty.Simple
if we want to properly provide all combinations of features.
Like I said above, I'm not necessarily against providing a compact
version of all these functions, but there are a couple things to think about:
Would enough users benefit from this? I'd like at least a few more people to reply to this issue and say "I absolutely can't live without this" before adding something like this.
Would it be possible to just change the default output format to compact? Is there anyone that absolutely hates compact?
Would we be able to compromise and add pPrintCompact
, but not add any other combinations? Would this annoy users? (In practice, which features/functions from Text.Pretty.Simple
are the most used?)
We haven't done it up until now, but we would also create additional modules to help with this complexity. We could have modules like Text.Pretty.Simple.Dark.NonCompact
, Text.Pretty.Simple.Light.Compact
, etc.
Would it be possible to just change the default output format to compact? Is there anyone that absolutely hates compact?
This would be my personal vote :+1: I dunno why it isn't default already :-)
Would it be possible to just change the default output format to compact? Is there anyone that absolutely hates compact?
I wouldn't be comfortable with that. It's a fairly recently-added feature, which isn't that well-tested, and has weird behaviour in some cases right now: #84.
As originally mentioned in #93 it would be convenient if
Text.Pretty.Simple
provided:and I suppose correspondingly: