DData revision (isSubsetOf / shorter names)

Daan Leijen daanleijen at xs4all.nl
Tue Mar 16 22:16:13 EST 2004

On Tue, 16 Mar 2004 12:44:03 +0100, Christian Maeder <maeder at tzi.de> wrote:

> Simon Marlow wrote:
>> I vote for consistently using isXXXX for predicates.
> this would (only) affect "null" (maybe "isEmpty" again) and "member".
> Please omit at least "Of" from XxxxOf, or what was the intention of "Of"? In Map this leads to a name "isProperSubsetOfBy" and apart form this "Subset" should become "Submap" within Map!
> Christian

So it is agreed: we use "isXXXX" :-)

I am not sure about "XXXXOf"  -- my taste says leave it out,
but I once added it as it seems more consistent.

I guess "submap" covers the meaning better than "subset" in the case of Map's.

-- Daan.

ps. I have a general remark towards nice cozy names like "subset", and "null",
versus consistent COBOL names like "isSubsetOf" and "isEmpty",
I believe that we should target an audience that sporadically uses the
library and those people must be able to guess names -- the lenght of
the name is not so important in that case, especially not for rarely
used operations like "isProperSubsetOf". A hard-core user can always
define "null = isEmpty; psubset = isProperSubsetOf" at the start of
his module. (and I feel that "null" should be reserved for lists)

> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries

More information about the Libraries mailing list