What would be the advantage of writing something like "See also fetch/2..." at the end of the @doc? The functions would be linked this way as well.
On Tuesday, 19 July 2016, eksperimental <eksperimen...@autistici.org> wrote: > I have been craving for this feature for a long time. > I think it will help with a lot with things such as including > discoverability of functions or leading people in the right direction > with very little effort from the documentation side. > > A @see_also (it could be named @related, or any other better name). > > Let's say in Enum module > > @spec at(t, index, default) :: element | default > @see_also [:fetch!/2, :fetch/2] > def at(enumerable, index, default \\ nil) do > case fetch(enumerable, index) do > {:ok, h} -> h > :error -> default > end > end > > @spec filter(t, (element -> as_boolean(term))) :: list > @see_also :reject > def filter(enumerable, fun) when is_list(enumerable) > and is_function(fun, 1) do > ... > > ExDoc could take advantage of such feature, and automatically linked to > suggested functions. > > -- > 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-core+unsubscr...@googlegroups.com <javascript:;>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/20160719054127.7a04ed2d.eksperimental%40autistici.org > . > For more options, visit https://groups.google.com/d/optout. > -- Andrea Leopardi an.leopa...@gmail.com -- 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-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAM9Rf%2BKMFzNnSSTMFDp%2BRvCbK3d8DU8Wa3C3TnSxt5ciUX%2BMyQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.