Types and specs in documentation

91 views
Skip to first unread message

José Valim

unread,
Aug 19, 2013, 2:36:55 PM8/19/13
to elixir-l...@googlegroups.com
Hello everyone,

Thanks to the great work of @pminten and @jwarwick on Github, Elixir docs now include typespecs:


As well as autolinking in between local functions:


Enjoy!

José Valim
Skype: jv.ptec
Founder and Lead Developer

Dave Thomas

unread,
Aug 19, 2013, 3:52:47 PM8/19/13
to elixir-l...@googlegroups.com
Nice job.

For beginners, though, I worry that the specs may be offputting, as they add quite a bit of noise to the documentation.

What do you think about hiding them behind a button on the same line as the function signature:



If clicked, the spec could either replace the signature (while the button is held), or it could appear below it.


Dave




--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Andy Richards

unread,
Aug 20, 2013, 3:37:02 AM8/20/13
to elixir-l...@googlegroups.com, da...@pragprog.com
Ah thats a great help, however I do think Dave's point is valid.

Chris-tina Whyte

unread,
Aug 20, 2013, 11:58:50 AM8/20/13
to elixir-l...@googlegroups.com, da...@pragprog.com


On Monday, August 19, 2013 4:52:47 PM UTC-3, Dave Thomas wrote:
Nice job.

For beginners, though, I worry that the specs may be offputting, as they add quite a bit of noise to the documentation.

What do you think about hiding them behind a button on the same line as the function signature:

I think they are okay. It would be fairly noisy if the documentation used C/Go-inspired type notations, but right now the "friendly" function signature and the formal type signature are fairly separated :)

 
On Mon, Aug 19, 2013 at 1:36 PM, José Valim <jose....@plataformatec.com.br> wrote:
Hello everyone,

Thanks to the great work of @pminten and @jwarwick on Github, Elixir docs now include typespecs:

That's really lovely ♥~

Andrew Hodges

unread,
Aug 22, 2013, 9:16:53 PM8/22/13
to elixir-l...@googlegroups.com, jose....@plataformatec.com.br
What about omitting the parentheses when the type has no arguments? It might be more readable/less distracting.

José Valim

unread,
Aug 23, 2013, 5:23:01 AM8/23/13
to elixir-l...@googlegroups.com
This is a great suggestion and it has been added to ExDoc master. The next time we generate docs, the parentheses will be removed.



José Valim
Skype: jv.ptec
Founder and Lead Developer


--
Reply all
Reply to author
Forward
0 new messages