I'd love to hear the reasoning behind that choice if it's Rich Hickey that did it, since it's called some and every in Common Lisp and he's written a great deal in that language.
Re:Clojure 1.6 released
by puredanger on Tuesday March 25, 2014 @03:00PM
(#7468065)
The names were chosen by Rich. Many choices were considered and they all had pros and cons. The new some?/if-some/when-some functions follow the "not nil" notion in "some->" (but break with the meaning in "some"). Naming is hard. :)
Agreed. Seems like a very unnecessary addition.
Re:Clojure 1.6 released
by puredanger on Tuesday March 25, 2014 @02:56PM
(#7468031)
The non-nil checks are particularly useful in core.async code as nil is a special value for channels (indicating they've been closed). This family of functions can be used to more concisely determine if a value from a channel is a value or means "close".
To check if some elements match you need to use (some odd? [2 3 4]) - note the lack of '?'
Bet it will confuse people.