Dom Kiva-Meyer <li...@domkm.com> writes:

>> 5) New "some" operations
>> Many conditional functions rely on logical truth (where "falsey"
>> values are nil or false). Sometimes it is useful to have functions
>> that rely on "not nilness" instead. These functions have been added to
>> support these cases [CLJ-1343]:
>> * some? - same as (not (nil? x))
>> * if-some - like if-let, but checks (not (nil? test)) instead of test
>> * when-some - like when-let, but checks (not (nil? test)) instead of test
>
> It seems inconsistent to have "some" mean two very different things
> within the same namespace,

I agree.

> Why not call these new functions `not-nil?`, `if-not-nil`, and
> `when-not-nil`?  Or, if "not-nil" is too unwieldy then what about
> "exists" (`exists?`, `if-exists`, `when-exists`)?

Or:

  non-nil?, if-non-nil, when-non-nil
  nonnil?,  if-nonnil,  when-nonnil
  nnil?,    if-nnil,    when-nnil

> Are these names up for discussion?

I had the same feeling and commented on the issue in JIRA before the
patch was applied.

  http://dev.clojure.org/jira/browse/CLJ-1343

But neither Rich nor Alex replied when they looked over the issue
afterwards, so I guess they like those names.  (This could become the
new "contains?")

Bye,
Tassilo

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to