If "contains?" is a sensible name for that function, then surely
"seq-contains?" cannot be a sensible name for a function which checks
a totally different sort of "containment"?
Also, if it is possible to view "seq-contains?" as a sensible enough
name for a core library function with sequential semantics, then
surely "contains?" cannot be intrinsically evocative of a different
notion of "containment", even if it is possible to get used to this
word being attached to such a notion.

Incidentally, I have personally got used to the Clojure meaning of
"contains?" without great difficulty, so I was initially a bit
surprised by this thread exploding to such length... But then
"contains?" is a very desirable name and in hindsight, a controversy
over which op it should be attached to was to be expected. Not just
because it's cool to have such a good name at one's disposal, but
because any other notion of "containment" is bound to get a
substandard name (if indeed it slips into the core lib at all),
because every other "good" name will be totally confused with
contains? by everyone and is therefore out of the game (cf.
includes?).

Using a few variant names (like the proposed ones based on
"contains?", but with disambiguating affixes attached) could be a
reasonable compromise. (Although I'd be a little bit sad that the
"perfect" name is gone, its sacrifice would mean two "reasonable"
names become available.) If that is unacceptable, then perhaps
"seq-contains?" could at least get a name *not* including the
"contains?" part, so that it becomes natural not to assume that it
does roughly the same thing as "contains?". (There's precedent for
prefixes meaning "do mostly the same thing, but in a different
context" in Clojure, e.g. "enumeration-seq", "iterator-seq".)

To end on a punnish note, I'd sort of expect the predicate counterpart
of "get" to be called "got?"... Oh well.

At the end of the day, I'm confident that the overall greatly
considered design of Clojure (including naming conventions) is
internally consistent enough that it can be conveyed to a newcomer
with a reasonable amount of good technical writing. Apparently most
people think the same and are therefore quite prepared to move on. :-)

All the best,
Michał

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to