Has there been any discussion around adding a module attribute @mark to Elixir that would function as a code organization tool similar to Swift's // MARK: or Objective-C's #pragma mark?
-- WHY --
As an example I've found that when developing Phoenix LiveView applications, modules often accumulate numerous handle_event/3 and handle_info/2 callback functions and it would be nice to have a way to organize things.
I understand that right now we can add comments, and we have compiler warnings. But nothing official an editor can support. Given that we want all the handle_event and handle_info functions together this seems like the way.
Clearly it would be optional. But it would be beneficial.
My proposal would:
The primary benefit would be improved code organization and readability in larger modules where related functions need to stay together but would benefit from visual separation and navigation support.
Thoughts?--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/elixir-lang-core/ebb12c67-1e90-430b-89c6-c78702e4c1d7n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/elixir-lang-core/CANnyohazJAaHk3DxrPgkrbT4x%3DPPE06KZcK-XkiL178XuXnvrQ%40mail.gmail.com.