[Proposal] @docp for private docs

136 views
Skip to first unread message

Niklas Johansson

unread,
May 26, 2021, 3:13:46 AM5/26/21
to elixir-lang-core
I think it would be great to have the possibility to write documentations for private functions similar to writing documentation for public functions. Maybe something like this.

@docp """
Increase with one
"""
defp convert(x) do
  x + 1
end

This tag will not generate "real" documentation but aims to make the code more readable "in the editor". And to help other developers understand the private function.

By using @docp, it will look very simlar to a public function with a @doc tag.

Kind regards
Niklas

esurk....@gmail.com

unread,
May 26, 2021, 3:29:43 AM5/26/21
to elixir-lang-core
Reply all
Reply to author
Forward
0 new messages