Module Naming Conventions and paths

What is Elixir’s module naming convention when you have to consider paths too?

1 Like

I am following the naming convention here:

Module names are CamelCase in the ex file, and the files themsevles are snake_case. Paths are prefixes to modules. So for example, foo/bar_baz.ex will be defmodule Foo.BarBaz do....


It is important to highlight this is only a convention though. Elixir does not care how you name your files as long as it has the proper extension and the file name does not need to match the module name in any way!


Thanks for the replies. You really cleared up many questions I had on that topic.

1 Like