Importing Elixir beam to erlang projects or env

hello guys,
I am working on some project , I have managed to add Elixir f project files to running erlang project but , I have noticed something interesting ;
3> m(‘Elixir.Welfare’).
Module: ‘Elixir.Welfare’
MD5: 71a6bde42c5caed235afc9bff24c9bbc
Compiled: No compile time info available
Object file: /var/studentwelfare1/elixir-middleware/welfare/_build/dev/lib/welfare/ebin/Elixir.Welfare.beam
Compiler options: [no_spawn_compiler_process,from_core,no_auto_import]
Exports:
info’/1
get_student/1
hello/0
inst/0
load_students/0
module_info/0
module_info/1
to_map/1
ok
4> ‘Elixir.Welfare’:inst().

I see Elixir append on each module after compilation ,
I would like to Understand why its important to add Elixir ??

Elixir’s atoms have two forms, either :blah/:"blah" or Blah. When they are in uppercase form like Blah then that becomes essentially :"Elixir.Blah", I.E. Blah == “Elixir.Blah”`. Elixir does this to namespace atoms.

Now, most defmodule ... are done with the uppercase form, so defmodule Blah ... is the same as defmodule :"Elixir.Blah" ..., hence that is where it comes from.

It’s a popular pattern among other languages that compile to the beam to have a namespacing like that.

I.E. it’s just elixir’s style of namespacing (although an elixir module made like defmodule :blah ... will still be the blah atom in erlang too), a ‘convention’ but not required.

1 Like

@OvermindDL1, Thanks

1 Like

If you are asking who is it that, then the answer is simple - to avoid name collisions on case-independent FS which are used on macOS and Windows.

2 Likes