[Haskell-cafe] Anyone up for Google SoC 2010?

iquiw iku.iwasa at gmail.com
Fri Mar 5 09:44:43 EST 2010


On Fri, Mar 5, 2010 at 4:07 PM, Johan Tibell <johan.tibell at gmail.com> wrote:
> I think I would use the module system for namespacing rather than using
> function prefixes. Like so:
> import Text.Html as E
> import qualified Text.Html.Attribute as A
> E.html ! [A.class_ "my-class"] (... more combinators ...)
>
> (Assuming that "!" is used to introduce attributes.)
> This allows you to use the element names and/or the attribute names
> unclassified if you so desire.
> html ! [class_ "my-class"] (... more combinators ...)
>>
>> Function names in the 'html' library are unpredictable from
>> corresponding element/attribute names...
>>  ("head", "base", "a" => "header", "thebase", "anchor")
>
> I'm of the same opinion. The combinators should match the element/attribute
> names as far as possible. The rule that I had in mind was that the
> combinators should have exactly the same name as the corresponding
> element/tag except when the name collides with a keyword (e.g. "class"). If
> the name collides with a keyword we could e.g. always append a "_".

That's fine.
However, I think no one uses unqualified import actually because of
conflict with basic functions ("head", "id", "map") and existent of
single character functions ("a", "b", "i", "p").

Anyway, I like the project.

Thanks,
iquiw


More information about the Haskell-Cafe mailing list