Thank you, Alex. I'll check them out. ~Timothy Dean
On Sun, Oct 8, 2017 at 8:09 PM, Alex Miller <a...@puredanger.com> wrote: > We had this discussion at length in several places (clojure mailing list, > clojure-dev mailing list, reddit probably) over a year ago when any? was > added in 1.9.0-alpha10. Search the archives for the prior discussions, I > don't have time right now to re-summarize it all. > > > On Sunday, October 8, 2017 at 11:56:11 AM UTC-5, Timothy Dean wrote: >> >> If the ship has sailed, why, then, the ship has sailed. I only send this >> now because I'd already written it before I saw your reply, Alex. >> >> I do not think `any?` is a "gigantic" mistake, though I do think it is >> confusing. I expect to see a few some?/any? bugs from beginners. `some?` >> and `any? essentially represent two English synonyms, both defined in the >> same namespace, each of which represents a check for existence, under two >> competing ontological frameworks. >> >> The bandit stopped me, asking, "Do you have Anything?" >> "I do," I said, "please don't hurt me." >> "If you have Something, hand it over!" >> I handed him nothing. >> "You said you had Something!" >> "No, you asked me if I had Anything!" >> "Just hand it over!" >> As he was irate and carried a big stick, I gave up and handed him Nothing. >> >> Ultimately the source of confusions such as this arise from the fact that >> Clojure is a language with a concrete token (Something) representing >> Nothing. some/any just compounds the confusion. But this problem arises in >> certain philosophies of ontology, and there already exists a distinction >> that strikes me as being quite natural in common English and a good fit for >> Clojure and spec: the distinction between something/nothing and >> presence/absence. >> >> I would propose `present?` as the name to replace `any?`. >> >> ---- >> >> But if the ship has sailed, then onward ho! Clojure will still be a great >> tool. >> >> ~Timothy Dean >> >> On Friday, October 6, 2017 at 5:55:31 PM UTC-6, Alex Miller wrote: >>> >>> This ship has sailed. >>> >>> On Oct 6, 2017, at 6:04 PM, Alan Thompson <cloo...@gmail.com> wrote: >>> >>> Before 1.9.0 is officially released, I would like to propose a revisit >>> to the semantic mismatch introduced by the *clojure.core/any? *function. >>> >>> Many, many people are dissatisfied by the choice of *clojure.core/any?* >>> to be defined as *(constantly true)*, which is completely in conflict >>> with *clojure.core/not-any?* . After all, any logical person would >>> automatically assume that: >>> >>> (= (not-any? args...) (not (any? args...)) >>> >>> >>> for any set of legal arguments. This follows the well-established >>> tradition in Clojure of having negated pairs such as* if* vs *if-not*, >>> *when *vs *when-not*, *every? *vs* not-every?*, etc. >>> >>> However, I can see that it is convenient to say something like this: >>> >>> (s/fdef clojure.core/declare >>> :args (s/cat :names (s/* simple-symbol?)) >>> :ret any?) >>> >>> >>> It seems a simple solution to the problem would be to just define some >>> keyword specs in place of the globally visible *any? *function. The >>> following example shows that we could define *:clojure.spec/pass-all *and >>> *:clojure.spec/pass-none* which would could serve as an exact >>> replacement for *any? *(& its negative). >>> >>> (:require [clojure.spec.alpha :as s] ...) >>> (deftest demo >>> (s/def ::s/pass-all (constantly true)) >>> (s/def ::s/pass-none (constantly false)) >>> >>> (is (s/valid? ::s/pass-all 5 )) >>> (is (s/valid? ::s/pass-all "joe" )) >>> (is (s/valid? ::s/pass-all { :blah 42 :blue 66 :hut! 'hut! })) >>> (is (not (s/valid? ::s/pass-none 5 )))) >>> >>> >>> Since 1.9.0 is not out yet, is not too late to avoid a permanent >>> pollution of the language with a gigantic mistake such as *any?*. At >>> the very least, the function could be moved to *clojure.spec/any?* from >>> *clojure.core*. If we insist on adding this blatant contradiction to >>> *clojure.core*, we won't even have the excuse of a committee to blame >>> it on. >>> >>> Alan Thompson >>> >>> >>> >>> On Sun, Nov 13, 2016 at 4:15 PM, Nathan Smutz <nsm...@gmail.com >>> <https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=nsm...@gmail.com>> >>> wrote: >>> >>>> Is there a Tricky Names for Nubies page? >>>> We might save some stack-overflow searches. >>>> >>>> In the spirit of Honest Trailers: if we named functions for what they >>>> do: >>>> or -> first-truthy >>>> some -> first-satisfying >>>> some? -> not-nil? >>>> any? -> return-true >>>> >>>> Are there others? >>>> >>>> -- >>>> 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 >>>> <https://mail.google.com/mail/?view=cm&fs=1&tf=1&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 >>>> <https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=clojure%2bunsubscr...@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 >>>> <https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=clojure%2bunsubscr...@googlegroups.com> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Clojure Dev" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to clojure-dev...@googlegroups.com. >>> To post to this group, send email to cloju...@googlegroups.com. >>> Visit this group at https://groups.google.com/group/clojure-dev. >>> For more options, visit https://groups.google.com/d/optout. >>> >>> -- > 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 a topic in the > Google Groups "Clojure" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/clojure/tPiW2DGHTN0/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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/d/optout.