Hacker News new | ask | show | jobs
by i_s 3616 days ago
In general, it seems like the authors of Elixir were able to capture more of the cool things about Clojure than LFE. Check out some of the top level functions in Elixir:

  update_in
  put_in
  get_in
http://elixir-lang.org/docs/stable/elixir/Kernel.html#update...

These are basically right out of Clojure. It may seem like a small thing, but consistent, well thought out functions like this makes working with immutable data structures much easier.

2 comments

"update", "put" are already available in Erlang[0] and work with nested records[1] if I understand correctly. Likewise, it seems that LFE has map-update for the same use cases[2].

[0] http://erlang.org/doc/man/maps.html

[1] http://erlang.org/doc/reference_manual/records.html#id86378

[2] https://github.com/rvirding/lfe/blob/develop/doc/user_guide....

Protocols are another major concept that Elixir lifted straight from Clojure. IMO one of the nicest ways of doing ad hoc polymorphism.