3 ms·
I don't know exactly where it happened, but here [1] is a typical AoC code using Elixir. At some point I got so annoyed by Elixir telling me it does not find th
by zelphirkalt 3y ago
I don't know exactly where it happened, but here [1] is a typical AoC code using Elixir. At some point I got so annoyed by Elixir telling me it does not find the functions of the very same module, that I simply defaulted to always writing the module name.
[1]: https://codeberg.org/ZelphirKaltstahl/advent-of-code-2023/src/branch/main/elixir/day_04/lib/part-01.ex https://codeberg.org/ZelphirKaltstahl/advent-of-code-2023/sr...
Edit: Ah yes, I remember it happening in |> pipes a lot.
- arrowsmith 3y agoI still don't get it. I downloaded your code and stripped `Part01.` from all the function calls and it worked fine with no warnings. What's the problem? By the way, these two lines are redundant: alias FileHandling, as: FileHandling alias ListUtils The first line is redundant because `alias X, as: Y` makes module X available with the name Y - so if X and Y are the same then it doesn't achieve anything. And the second line is redundant because `alias X.Y.Z` with no `as` makes module `X.Y.Z` available with the abbreviated name `Z`. But if the original module name contains no dots then then there's nothing to abbreviate.