Re: Simplified signatures in generated documentation

2014-08-21 Thread Jacob Carlborg via Digitalmars-d
On 20/08/14 18:34, H. S. Teoh via Digitalmars-d wrote: Sorry, I didn't make myself clear. What I meant was that ddoc will generate the above structure, so that user ddoc templates can customize the appearance of each element in the declaration. You don't actually write any of these macros

Simplified signatures in generated documentation

2014-08-20 Thread Jacob Carlborg via Digitalmars-d
Looking at the documentation for std.algorithm and the std.logger (currently under review) [1] I think the function signatures look absolutely horrible. The functions std.algorithm in have complicated template constraints and in std.logger there are many functions with default arguments like

Re: Simplified signatures in generated documentation

2014-08-20 Thread bearophile via Digitalmars-d
Jacob Carlborg: The simplified signatures would be show for the main signatures, i.e. the ones with a light blue background, and the full signatures would be added at the end of the documentation for each symbol. Another possible improvement is to add popups that show the complete type

Re: Simplified signatures in generated documentation

2014-08-20 Thread Martin Drasar via Digitalmars-d
On 20.8.2014 9:04, Jacob Carlborg via Digitalmars-d wrote: Looking at the documentation for std.algorithm and the std.logger (currently under review) [1] I think the function signatures look absolutely horrible. The functions std.algorithm in have complicated template constraints and in

Re: Simplified signatures in generated documentation

2014-08-20 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Wednesday, 20 August 2014 at 07:04:50 UTC, Jacob Carlborg wrote: * Remove template constraints. I think, at least with std.algorithm, it's mostly obvious what to pass and I rarely need to look at the constraints BTW aren't they a bit over-complicated? (args.length == 0 || (args.length 0

Re: Simplified signatures in generated documentation

2014-08-20 Thread Paulo Pinto via Digitalmars-d
On Wednesday, 20 August 2014 at 07:04:50 UTC, Jacob Carlborg wrote: Looking at the documentation for std.algorithm and the std.logger (currently under review) [1] I think the function signatures look absolutely horrible. The functions std.algorithm in have complicated template constraints and

Re: Simplified signatures in generated documentation

2014-08-20 Thread Stefan Frijters via Digitalmars-d
The simplified signatures would be show for the main signatures, i.e. the ones with a light blue background, and the full signatures would be added at the end of the documentation for each symbol. I like it. Some of my code also features a lot of free functions with template constraints and

Re: Simplified signatures in generated documentation

2014-08-20 Thread Jacob Carlborg via Digitalmars-d
On 20/08/14 10:20, Paulo Pinto wrote: I think this is important when discussion about language complexity, as the discussions in the Scala community show. Scala has simplified signatures for a few methods as well, see:

Re: Simplified signatures in generated documentation

2014-08-20 Thread Jacob Carlborg via Digitalmars-d
On 20/08/14 09:35, bearophile wrote: Another possible improvement is to add popups that show the complete type when the mouse is over the name of a type or value. You can see that used in this F# code: http://tomasp.net/blog/2014/puzzling-fsharp/ And in this near-Haskell code:

Re: Simplified signatures in generated documentation

2014-08-20 Thread H. S. Teoh via Digitalmars-d
On Wed, Aug 20, 2014 at 09:04:49AM +0200, Jacob Carlborg via Digitalmars-d wrote: Looking at the documentation for std.algorithm and the std.logger (currently under review) [1] I think the function signatures look absolutely horrible. The functions std.algorithm in have complicated template

Re: Simplified signatures in generated documentation

2014-08-20 Thread Jacob Carlborg via Digitalmars-d
On 2014-08-20 16:59, H. S. Teoh via Digitalmars-d wrote: No, I want to see all parameters in the docs. If it was unclear, all parameters will be available in the full signature that is available in the generated docs as well. I disagree. See above If we had more control over the

Re: Simplified signatures in generated documentation

2014-08-20 Thread H. S. Teoh via Digitalmars-d
On Wed, Aug 20, 2014 at 06:15:39PM +0200, Jacob Carlborg via Digitalmars-d wrote: On 2014-08-20 16:59, H. S. Teoh via Digitalmars-d wrote: [...] Basically, the formatting of declarations need to be more structured. Currently we can only format the entire giant declaration as a unit, and