Fork me on GitHub
#off-topic
<
2017-09-06
>
souenzzo13:09:48

(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)})

noisesmith13:09:01

@souenzzo another good one is if you call map? on each one

noisesmith13:09:42

or in your case, map map? on each one

dominicm13:09:19

The weird one for me is that (= (doto (new java.util.HashMap) (.put :db/id 1)) (hash-map :db/id 1)) ;; => true

dominicm13:09:41

but the second there's a set around it, it isn't true.

dominicm13:09:45

It's not doing identity, else there'd be issues with (= (hash-set "foo") (hash-set (str "fo" "o"))) too

dominicm13:09:20

user=> (hash-set (doto (new java.util.HashMap) (.put :db/id 1)) (hash-map :db/id 1))
#{{:db/id 1} {:db/id 1}}

fellshard20:09:53

The 'easiest' languages to start with are also often the ones that breed the worst long-term engineering habits.

fellshard20:09:12

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.

fellshard20:09:59

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.

sundarj20:09:59

it's a shame, really

tbaldridge21:09:32

It's the whole easy/simple thing again.

fellshard21:09:44

Yep. A recurring industry theme.

lemontea16:09:48

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

seancorfield22:09:27

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.

seancorfield22:09:53

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

max-tweddell23:09:28

Python is okay

max-tweddell23:09:36

but i don’t think it is much more then that