Names for small functions: just say no... Re: Data.List.join

Neil Mitchell ndmitchell at gmail.com
Fri Nov 10 12:39:10 EST 2006


Hi

> Actually, I'd start by
> deprecating Show, because for machine readability it's not
> efficient and for human readability it's too simplistic.

When I show values there are 3 categories they fall into:

1) Output in a way for debugging - the current deriving Show gives me
this, but its a pain I have to add deriving Show everywhere just to
get debugging - I'd rename it Raw, and have everything derive Raw
automatically and without comment.

2) Ouputting simple things. If I have a list of things, a pretty
printing combinator is overkill - and whats more I don't care if the
lines wrap around. I'd much rather have a nice simple "make this a
string". The current Show solves this perfectly.

3) Pretty printing. I have an Output class for this (since i like to
use the deriving Show for debugging).

Show is good at what it does, for use case number 2.

I use interact (intercalate as it is now) and intersperse lots, in
both variations. One is good, both are better!

(Have they been committed now? I thought I saw that go through...)

Thanks

Neil


More information about the Libraries mailing list