Earlier quoted context omitted.
> I mean, unlike in typical hard FP languages like Haskell or Elm What is a "typical" FP language? Are Scheme, Common Lisp, OCaml, SML, atypical? > mutable state is rampant in your average Elixir app I don't think this is generally true, or at least not on my experience, but I guess it may depend on what would one consider rampant.
Well, my main Elixir project is the backend of a web service. The input is JSON from the frontend and JSON or XML from a number of third party APIs. We process it, hit the db with select, update, insert and usually return a value. The same function with the same inputs usually returns different values because the db is stateful. What I like of Elixir is not functional programming, it's the extensive use of pattern ma…
While GenServer's store state they are, in my mind, more akin to microservices than Java/C++ Objects. They're like microservices, but without needing a separate service bus, global naming system (pg2), etc. Now I do wish Dialyzer/Dialyxer also had better support for checking GenServer handler's and messages, especially intra-process. You have a point the syntax their could be spruced up some perhaps. The process / GenServer paradigm kind of remind me of Smalltalk in a way, where you're passing messages that object may or may not want to respond to. That's not really possible with C++/Java objects.