Text.ParserCombinators.* is a bad name
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Thu Mar 9 09:30:26 EST 2006
Chris Kuklewicz <haskell at list.mightyreason.com> wrote:
> And now Donald and I both need part of the Text*Regex* namespace.
>
> So I could name the module path using some combination of relevant
> adjectives "Parser,Parsec,Lazy,Native,Faster,Replacement"
>
> Text.Regex.Parsec
> Text.Regex.Lazy
Yes, any of those seem adaequately descriptive.
> This is where java's namespace is so brilliant. I could have used
> reverse-dns:
>
> Com.MightyReason.Haskell.Text.Regex
And of course you can use that namespace in Haskell too, if you wish.
That scheme is even described as a possibility in the Report Addendum
for hierarchical namespaces.
> So how should Donald and I avoid a namespace collision?
By agreement. :-) Just because plain Text.Regex is already taken,
doesn't mean it has to stay that way. Another common approach is to
select a "project name" as the discriminating element of the namespace,
e.g.
Text.XML.HaXml.*
Graphics.UI.WX.*
Graphics.UI.Gtk.*
So you could agree on
Text.Regex.MightyReason
Text.Regex.Dons
and rename the existing package as
Text.Regex.Gnu
or whatever (I don't know if it really is from Gnu).
Regards,
Malcolm
More information about the Libraries
mailing list