DEV Community

Discussion on: Mixing Gleam & Elixir

Collapse
 
preslavrachev profile image
Preslav Rachev

Nice writeup! Would you know if it is possible to register Gleam modules to be accessed using the same naming convention of Elixir? I know that at the end of the day, all module names are just atoms, but mixing the style will make the code base inconsistent, IMO.

Collapse
 
michaeljones profile image
Michael Jones

Thanks for the question. I don't know too much about the situation, I'm afraid.

I think Gleam modules are compiled to be maximally accessible from Erlang. It has crossed my mind that Gleam could have an output mode that namespaced things for Elixir (I think Elixir modules are just atoms that start with "Elixir." though I'm far from an expert.) I don't think that is planned at the moment though. Might be worth raising. The gleam community has a uses GitHub discussions (github.com/gleam-lang/gleam/discus...) and Discord (discord.com/invite/Fm8Pwmy) for communicating mostly at the moment.

I imagine that if you were to create a library in Gleam and wanted to make it even friendlier for Elixir programmers then you publish some Elixir modules into the bundle that act like a shim to provide Elixir style access to the functions and types.