Haskell platform proposal: split package - concerns about synonyms in API

Jon Fairbairn jon.fairbairn at cl.cam.ac.uk
Sun Jul 22 10:54:50 CEST 2012

Ben Moseley <ben_moseley at mac.com> writes:

> On the naming side of things, I'd just like to say I agree
> with Roman here - I think having synonyms in an API is a bad
> idea.


> I think there might be an argument that synonyms improve
> things for those who know the API really well - but that comes
> at the cost of worsening the experience for those (i.e. most)
> who know it moderately or fairly well and thus - when reading
> code written by others - find themselves struggling to
> remember whether the variants that they don't use personally
> are subtly different or not.

Exactly. And it’s very easy for someone who wants a synonym to
define it. There’s an issue in this case of avoiding breaking
code, but including them, deprecating them and hiding them from
the documentation seems to solve that.

> P.S. I think "intercalate" is an awful name,

What have you got against it? For the record I was against
introducing a name for such a short function (argument is
similar to that against synonyms), but it does mean exactly the
right thing.

> and "unintercalate" is certainly no better ;-)

I’ll grant that that is very ugly.
Jón Fairbairn                                 Jon.Fairbairn at cl.cam.ac.uk

More information about the Libraries mailing list