| Having worked with both to create the same system (building a game server) I've found Clojure actually sits better with the functional thinking style (1 data structure, 100 functions). While Phoenix was the killer app for Elixir, and Elixir has far superior readability (using the Ruby syntax); there were couple of things that were off-putting and I struggled with them. 1. everything is inside a module was an unnecessary distraction 2. And then the separation between anonymous and named functions simply were unnecessary 3. And that I would have to declare the data / record inside a module (??) Elixir felt like a functional language un-necessarily trying to look like a class based language. I sometimes feel that had Elixir had only supported functions outside of modules... oh that freedom. But some of the thought that went into Flow, Channels (which has become the de riguere now), mix (developer ergonomics ftw), those micro-second latency responses, distillery are still too classy and amazing. |
Not really. Named functions live in modules because that is how it is done in Erlang; Elixir is compiled to Erlang's abstract syntax. In practice does anyone define Clojure functions outside of a namespace? Haskell functions are always defined in modules too, do you think they got that from class based languages?