Hacker News new | ask | show | jobs
by 59nadir 3616 days ago
> Specifically vectors and maps. These exist all over the place, but no where (in my experience) are they as pain-free as clojure.

You don't use vectors very much on the BEAM in general, so I wouldn't consider this very important. Maps are more popular, but have a complicated relationship with records and records have, due to historical reasons, not seen much light on the BEAM in general until lately.

Tuples, which you could use as vectors, sort of, can be written as follows:

(tuple 'hey 'ho "let's go") <-> #(hey ho "let's go")

Tuples are infinitely more important than maps on the BEAM and so they deserve special syntax.

I think insisting that everything should be like Clojure is a great way to not really see anything different. While I understand that your idea is that "everything else should see what's so great about Clojure", maybe you could take that to heart as well.

Edit, addition: I wonder what the stats on posts starting with "I'm/As a Clojure fan..." are. If someone is an Archlinux user, a vegan, a crossfitter and a Clojure user, which do they tell you first?

2 comments

I prefaced with clojure fan to give context for my post. As a clojure fan, my point of view is going to be from a clojurist. It's a clue as to how to remove bias.

I don't think everything should be like clojure, I just think clojure gets datastructures right in ways that I haven't seen in other languages. I don't think I insisted on everything, or anything, being like clojure.

Right now my dream language would be mostly haskell with clojure maps. Next year it could be something different.

Adding this correction:

"Maps are more popular, but have a complicated relationship with records and maps have, due to historical reasons, not seen much light on the BEAM in general until lately."

The correction is that maps are the rarer thing, whereas records are more common, due to their lightweight implementation (tuples).