This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-06
Channels
- # beginners (147)
- # boot (12)
- # chestnut (12)
- # cider (22)
- # clara (10)
- # cljs-dev (6)
- # cljs-experience (3)
- # cljsrn (12)
- # clojure (58)
- # clojure-austin (3)
- # clojure-dusseldorf (25)
- # clojure-finland (20)
- # clojure-gamedev (1)
- # clojure-greece (3)
- # clojure-italy (32)
- # clojure-new-zealand (5)
- # clojure-russia (12)
- # clojure-serbia (1)
- # clojure-spec (4)
- # clojure-uk (51)
- # clojurescript (75)
- # cursive (8)
- # datomic (81)
- # fulcro (29)
- # graphql (16)
- # heroku (6)
- # incanter (1)
- # keechma (1)
- # lumo (44)
- # off-topic (21)
- # onyx (22)
- # parinfer (5)
- # portkey (40)
- # re-frame (43)
- # reagent (5)
- # spacemacs (37)
- # specter (8)
- # unrepl (3)
(let [java-map #{(doto (new java.util.HashMap) (.put :db/id 1))}
clojure-map #{(hash-map :db/id 1)}]
{:trying (= (class java-map) (class clojure-map))
:to-debug (= (str java-map) (str clojure-map))
:on-repl (str [java-map clojure-map "<<looks the same"])
:unexpected (= java-map clojure-map)})
@souenzzo another good one is if you call map?
on each one
or in your case, map map? on each one
The weird one for me is that (= (doto (new java.util.HashMap) (.put :db/id 1)) (hash-map :db/id 1)) ;; => true
It's not doing identity, else there'd be issues with (= (hash-set "foo") (hash-set (str "fo" "o")))
too
user=> (hash-set (doto (new java.util.HashMap) (.put :db/id 1)) (hash-map :db/id 1))
#{{:db/id 1} {:db/id 1}}
https://github.com/jafingerhut/thalia/blob/master/doc/other-topics/equality.md is interesting to read. Sounds like this "broke" in 1.6 https://dev.clojure.org/jira/browse/CLJ-1372
The 'easiest' languages to start with are also often the ones that breed the worst long-term engineering habits.
I'd always caution against linking 'popularity' to 'maturity' in the software world because of that. When something is widely used, that remarks more on its necessity or ease of entrance more than its actual engineering qualities.
So rarely is a language selected for its engineering qualities, in fact, that I'd hesitate to make any correlation at all on that point.
It's the whole easy/simple thing again.
(rant-mode) recurring sadness for me too: https://www.jwz.org/doc/worse-is-better.html it's not just about lisp - it seems that worse wins out every time, in every domain in CS/software. When will we escape this cycle?
A great example of that is ColdFusion -- very, very easy to learn, so "webmasters" and legions of non-programmers have picked it up to build straightforward data-centric web apps at a lot of companies, but most CF developers have no programming background at first and are usually self-taught, leading to some horrendous code -- and sometimes million-line monstrosities that power entire businesses.
(the language itself has both commercial and FOSS implementations, compiles on-the-fly to JVM bytecode -- like Clojure -- and had closures before Java, supports map/filter/reduce on built-in collection types, and has all sorts of interesting dynamic/metaprogramming features)
Python is okay
but i don’t think it is much more then that