5 ms·
Is it possible to work with Phoenix in Lisp Flavoured Erlang (LFE) [0], or any of the other Erlang based languages, instead of Elixir? [0] https://lfe.io/ http
by nanna 3y ago
Is it possible to work with Phoenix in Lisp Flavoured Erlang (LFE) [0], or any of the other Erlang based languages, instead of Elixir?
[0] https://lfe.io/ https://lfe.io/
- djur 3y agoA lot of what Phoenix has to offer comes from Elixir language features and the Mix build tool. To the extent it's possible I can't imagine it would be pleasant or useful.
- lawn 3y agoPhoenix relies heavily on Elixir macros, so you'd first have to compile and then try to call the generated functions... But I'm not sure that makes a whole lot of sense as you'd be missing out of most of the benefits of Phoenix. A more pragmatic approach is to use Elixir for the Phoenix specific parts, and from there call the other Erlang based languages for your business logic.
- kemiller 3y agoThese types are static and don’t end up in the runtime (which has no notion of types), so no. LFE will need its own solution, like Gleam.
- paradox460 3y agoYes, but it isn't exactly ergonomic. Elixir tries to namespace most of its stuff within an Elixir namespace, so you have to use that when calling functions out of it. All the Elixir macro magic, however, will not carry forwards, so you'll have to be using the compiled Phoenix bytecode
- marianoguerra 3y agoCheck https://github.com/josevalim/erl_phoenix https://github.com/josevalim/erl_phoenix > Writing Phoenix controllers, templates, plugs, and live views from Erlang