News for hackers. Stuff that matters.
Re:Hurl, the Exceptional Language by smj-edison on Sunday May 26, 2024 @07:27PM (#40486288)
Doesn't Elixir (and Erlang for that matter) specifically require a module to not be in a specific place in order to have hot reloading of modules? Though I suppose you could still have hot reloading and require a module to be in a specific place.
Re:Hurl, the Exceptional Language by throwawaymaths on Monday May 27, 2024 @01:11AM (#40487751)
Nope. Elixir doesn't care where your module lives. (You can even "nest" modules, though it's not a great practice)
Re:Hurl, the Exceptional Language by __jonas on Monday May 27, 2024 @03:50AM (#40488624)
Not sure, could be that Elixir stuck close to Erlang's module system yeah.

But for example gleam [1] is another language on the BEAM (compiles to Erlang), that has a much nicer approach: All imports must be declared explicitly, and the import path in your local project is based on the file structure so you always know where something is imported from [2].

[1] https://gleam.run/

[2] https://tour.gleam.run/basics/modules/