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.
[ Parent
| on HN ]
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)
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].