Closed anthonator closed 5 years ago
I would expect @module_attribute would come after @moduledoc and @behaviour. The reason being they can be compiled into other attributes in the list.
@module_attribute
@moduledoc
@behaviour
For instance, this is possible:
defmodule MyModule do @attrs [ :attr_1 ] defstruct @attrs end
I agree that module attributes could generally come earlier in the module ordering.
Here's an example from the standard library: https://github.com/elixir-lang/elixir/blob/v1.7.4/lib/elixir/lib/hash_dict.ex#L21
I would expect
@module_attribute
would come after@moduledoc
and@behaviour
. The reason being they can be compiled into other attributes in the list.For instance, this is possible: