4 ms·
> If I understand correctly, you're saying Erlang/Elixir code would be easier to understand and work with if functions that did I/O or message passing etc. were
by valenterry 4y ago
> If I understand correctly, you're saying Erlang/Elixir code would be easier to understand and work with if functions that did I/O or message passing etc. were labeled as such, via type info.
No, not quite. Pure functional programming is a specific style or paradigm. It's about writing referential transparent expressions only. Tagging something is "impure" is absolutely not the same, even though doing so and/or separating pure and impure functions is a good first step on the way to pure functional programming.
> Who knows though. Maybe we'll see interesting things in Gleam in the future :)
Would be nice and might make me switch ecosystems. As of now, there don't seem to be concrete plans:
> Yes, Gleam is an impure functional language like OCaml or Erlang. Impure actions like reading to files and printing to the console is possible without special handling.
> We may later introduce an effects system for identifying and tracking any impure code in a Gleam application, though this is still an area of research.