Since transients are no longer marked as alpha, I want to take this (last?)
chance to raise an interface question concerning them:

Right now, we cannot distinguish whether a transient contains a key with a
nik value or if it doesn't contain the key, because contains? doesn't work
on transients.
Is it supposed to stay that way?

There is a long standing ticket for that, which seems to have been
overlooked when promoting transients out of alpha:
http://dev.clojure.org/jira/browse/CLJ-700


2014-02-17 3:54 GMT+01:00 Mars0i <marsh...@logical.net>:

> I like Alex's suggestions.  Another option is "something" rather than
> "some" or "exists".  "Something" has the disadvantage that it's long, so
> when you combine it with addition strings, you get something even longer.
>
> On the other hand, for me both "some" and "exists" sound like existential
> quantifiers in logic, as in "Some x is F",  "There exists an x such that
> Fx".  The clojure function *every?* plays the role of the universal
> quantifier (All x are F), and the *some* function plays the role of the
> existential quantifier, although it does more.
>
> However, a function named "something?" doesn't really sound like an
> existential quantifier (despite the fact that in English "something" can be
> used to express the existential quantifier ("something is F").  Rather,
> "something?" suggests that there's something, rather than nothing, i.e.
> rather than nil.
>
> (something? false) => false
> is still a little bit confusing, but if you think of it as saying that
> falsehood is not nothing, then maybe it makes sense.
>
>
>
> On Sunday, February 16, 2014 11:29:38 AM UTC-6, Alex Walker wrote:
>>
>> Part of Rich's objection to not-nil? variants could be that they are a
>> double negative, "not-(no value)?", which can decrease clarity and require
>> more coffee.
>>
>>
>>>    - nil Means 'nothing/no-value'- represents Java null and tests
>>>    logical false [clojure.org/reader]
>>>
>>>
>> To compete with some? variants, I'd suggest a positive that I found
>> strangely available:
>>
>> exists?
>> if-exists[?]
>> when-exists[?]
>>
>> Or, more proper, though potentially more overloaded: value?, if-value[?],
>> when-value[?].
>>
>> On Sunday, February 16, 2014 12:54:12 AM UTC-6, Эльдар Габдуллин wrote:
>>>
>>> Like this, just
>>>
>>> not-nil?
>>> if-not-nil
>>> when-not-nil
>>>
>>> is much better for me.
>>>
>>>
>>>
>>> суббота, 15 февраля 2014 г., 7:12:21 UTC+4 пользователь Joel Holdbrooks
>>> написал:
>>>>
>>>> As an addendum to my last comment, *not-nil?* would also be a good
>>>> candidate. That really doesn't leave room for doubt.
>>>>
>>>> This:
>>>>
>>>>  (some? false) ;; => true
>>>>
>>>> Would confuse me. On the other hand this:
>>>>
>>>> (not-nil? false) ;; => true
>>>>
>>>> Would not.
>>>>
>>>> There's really no need to complicate the naming story here. It's also
>>>> easy to remember!
>>>>
>>>> On Friday, February 14, 2014 3:25:36 PM UTC-8, Alex Miller wrote:
>>>>>
>>>>>
>>>>>
>>>>> On Friday, February 14, 2014 2:27:49 PM UTC-6, DomKM wrote:
>>>>>>
>>>>>> Great changes! I have a question about #5.
>>>>>>
>>>>>>
>>>>>>> 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, especially since the prior uses of "some"
>>>>>> (`some`, `some-fn`, etc.) are more in keeping with its primary definition
>>>>>> of having to do with amount (and operate on seqs or variadic arguments)
>>>>>> while the new functions have to do with existence (and operate on any
>>>>>> single value). 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`)?
>>>>>>
>>>>>> Are these names up for discussion?
>>>>>>
>>>>>
>>>>> Hey Dom et al,
>>>>>
>>>>> The names of these functions were chosen by Rich. There was already
>>>>> some name overloading of "some" even before these new functions with some
>>>>> (truthy) and some->/some->> (not nil). The new functions keep with the
>>>>> latter meaning. Many other names were considered, including everything 
>>>>> I've
>>>>> seen someone mention (-not-nil, exists, nnil, etc). As far as I know these
>>>>> names are final, however, I will relay all of the feedback I've seen here,
>>>>> on #clojure, and on Twitter to Rich for consideration.
>>>>>
>>>>> Alex
>>>>>
>>>>>
>>>>  --
> 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.
>

-- 
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