[Haskell-cafe] Don't make 'show*' functions

wren ng thornton wren at freegeek.org
Fri Jan 2 23:20:19 EST 2009

Henning Thielemann wrote:
> I think, that a user who uses GHCi becomes a developer. For me a user is
> someone who calls compiled Haskell programs.

GHCi makes for a great calculator.

I agree that, to a first approximation, "users" call compiled binaries 
and "developers" use GHCi. But there's a big gap between those two which 
is not devoid of life. I think there are many more people who use GHCi 
as an interactive shell session than most folks give credit for. More 
particularly, I posit that the prevalence of these people is part of 
what muddies the questions of who the audience of Show should be.

Even if we chose to lump them in with "developers" there's still the 
very real problem of resolution. Many people develop by bricolage, which 
means that over time they transition from being "interactive users" or 
"casual developers" or "scripters" into being "'real' developers". Just 
as often 'real' developers transition into interaction when they want to 
do active debugging. We should be able to visualize data differently at 
each of these different stages, but it is just as important ---if not 
moreso--- to be able to transition between different resolutions easily.

So far, the Show class is very much a one-size-fits-all solution which 
doesn't fit anyone very well. IMO, trying to refine or redefine the 
intended semantics of Show is wrongheaded, because the space between 
"users" and "developers" is far closer to being continuous than 
discrete. A single type-class that looks like Show cannot possibly 
resolve this mismatch, no matter what the intended semantics are. The 
continuous space between "users" and "developers" requires some solution 
which takes the variability of audiences/resolutions into consideration. 
Trying to shove everyone into the same bucket has been not working for 
some time already. We should acknowledge the real problem behind that.

Live well,

More information about the Haskell-Cafe mailing list