I have honestly never seen this before! How did I miss it?
Thank you!

W dniu wtorek, 18 lipca 2017 08:09:02 UTC+2 użytkownik Wojtek Mach napisał:
>
> Folks at Elixir Core already thought about it: @typedoc :)
>
>
> https://github.com/elixir-lang/elixir/blob/v1.5.0-rc.1/lib/elixir/lib/calendar.ex#L26:L33
> https://hexdocs.pm/elixir/1.5.0-rc.1/Calendar.html#t:day_fraction/0
>
> 2017-07-18 1:11 GMT+02:00 Krzysztof Wende <[email protected] 
> <javascript:>>:
>
>> Hello everyone!
>>
>> This is my first proposal, but it's not huge and I believe would yield 
>> some positive value to the elixir community.
>>
>> Every time we write bigger systems in Neon Tree Solutions Ltd we try to 
>> define all the specs and types to make the code look clearer.
>> A pattern that emerges very commonly is writing a big comment block 
>> before a type, to describe what it does and how it's supposed to be used.
>> And as elixir treats documentation as first class citizen I believe it 
>> would be a valuable feature to treat `@doc` blocks before types, the same 
>> way they are treated before functions. Right now they are just discarded 
>> with a warning:
>>
>>
>>
>> <https://lh3.googleusercontent.com/-es1jeezmflQ/WW1DPsb8SuI/AAAAAAAAAH8/lbaNVvX0ERwSlrbqGAGc4wXPbF1ZfWA2gCLcBGAs/s1600/Screen%2BShot%2B2017-07-18%2Bat%2B01.07.25.png>
>>
>> I am aware that it isn't simple in terms of implementation, since a `def` 
>> is a macro and a type is defined with a module attribute `@type`, but I 
>> think it'd be worth discussing a possible ways of implementing such feature.
>>
>> Plus imagine how beautiful Hex Docs would be if these gaps were filled:
>>
>>
>> <https://lh3.googleusercontent.com/-IGKxdbsqM78/WW1DscQ2FKI/AAAAAAAAAIA/0H-DvlHplW0lpff6UqiTIj1U3focdWFMACLcBGAs/s1600/Screen%2BShot%2B2017-07-18%2Bat%2B01.07.49.png>
>>
>>
>> Thank you for taking time discussing this topic!
>>
>> Cheers
>>
>>
>> -- 
>> 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 [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/elixir-lang-core/098b967e-d38c-47aa-8783-34e76bff00c0%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/elixir-lang-core/098b967e-d38c-47aa-8783-34e76bff00c0%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Wojtek Mach
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/662afc8e-d580-429f-ae95-d707f12eacf3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to