Jump to page: 1 211  
Page
Thread overview
Embedded Documentation in Comments
Aug 27, 2005
Walter
Aug 27, 2005
Vathix
Aug 27, 2005
Walter
Aug 27, 2005
Vathix
Aug 27, 2005
Ben Hinkle
Aug 27, 2005
Vathix
Aug 27, 2005
Ben Hinkle
Aug 27, 2005
Jason Mills
Aug 27, 2005
Walter
Aug 27, 2005
Ben Hinkle
Aug 27, 2005
Walter
Aug 27, 2005
J Thomas
Aug 27, 2005
Charles
Aug 27, 2005
Walter
Aug 27, 2005
Hasan Aljudy
Aug 27, 2005
Walter
Aug 27, 2005
Ameer Armaly
Aug 27, 2005
Bruno Medeiros
Aug 27, 2005
Ben Hinkle
Aug 27, 2005
James Dunne
Aug 27, 2005
Walter
Aug 27, 2005
Dave
Aug 27, 2005
Bruno Medeiros
Aug 27, 2005
Ben Hinkle
Aug 27, 2005
Mike Parker
Aug 27, 2005
jmjmak
Aug 27, 2005
Walter
Aug 27, 2005
Ben Hinkle
Aug 27, 2005
Walter
Aug 27, 2005
Walter
Aug 27, 2005
Bruno Medeiros
Aug 27, 2005
Bruno Medeiros
Aug 27, 2005
Walter
Aug 27, 2005
Derek Parnell
Aug 27, 2005
Walter
Aug 27, 2005
Ben Hinkle
Aug 27, 2005
Walter
Aug 28, 2005
Ben Hinkle
Aug 28, 2005
Bruno Medeiros
Aug 28, 2005
Hasan Aljudy
Aug 28, 2005
Walter
Aug 27, 2005
Ben Hinkle
Aug 27, 2005
Chris Sauls
Aug 27, 2005
Walter
Sep 02, 2005
Stewart Gordon
Sep 02, 2005
Derek Parnell
Aug 27, 2005
Walter
Aug 27, 2005
ElfQT
Aug 27, 2005
Walter
Aug 27, 2005
ElfQT
Aug 27, 2005
Walter
Aug 28, 2005
Ben Hinkle
Aug 28, 2005
Walter
Aug 28, 2005
Chris Sauls
Sep 01, 2005
Daniel Siegmann
Sep 01, 2005
Chris Sauls
Aug 27, 2005
Derek Parnell
Aug 27, 2005
ElfQT
Aug 27, 2005
Derek Parnell
Aug 27, 2005
Walter
Aug 28, 2005
Derek Parnell
Aug 28, 2005
John Reimer
Aug 28, 2005
Walter
Aug 28, 2005
J C Calvarese
Aug 28, 2005
Vathix
Aug 28, 2005
Ben Hinkle
Aug 28, 2005
John Reimer
Aug 27, 2005
John C
Aug 28, 2005
Walter
Aug 29, 2005
Michael
Aug 30, 2005
ElfQT
Aug 28, 2005
Freejack
Aug 31, 2005
Walter
Aug 31, 2005
Derek Parnell
Aug 31, 2005
Freejack
Aug 31, 2005
Derek Parnell
Aug 31, 2005
Walter
Aug 31, 2005
Freejack
Aug 29, 2005
Niko Korhonen
Aug 29, 2005
clayasaurus
Aug 29, 2005
Jonathan Oser Jr.
Aug 30, 2005
Chris Sauls
Aug 30, 2005
Bruno Medeiros
Aug 31, 2005
Regan Heath
Aug 31, 2005
Knud Sørensen
Aug 31, 2005
Walter
Sep 02, 2005
Stewart Gordon
Sep 02, 2005
Derek Parnell
Sep 05, 2005
Knud Sørensen
Sep 05, 2005
Knud Sørensen
Sep 02, 2005
Stewart Gordon
Sep 02, 2005
Walter
Sep 04, 2005
Stewart Gordon
Sep 04, 2005
Walter
Sep 05, 2005
Stewart Gordon
Sep 06, 2005
Walter Bright
Sep 11, 2005
Charles Hixson
Sep 03, 2005
pragma
Sep 04, 2005
Walter
Sep 04, 2005
pragma
Sep 04, 2005
Walter
Sep 05, 2005
Peri Hankey
August 27, 2005
I've put up a strawman proposal for embedding documentation in comments at www.digitalmars.com/d/doc.html


August 27, 2005
On Sat, 27 Aug 2005 04:47:18 -0400, Walter <newshound@digitalmars.com> wrote:

> I've put up a strawman proposal for embedding documentation in comments at
> www.digitalmars.com/d/doc.html

Page not found.
August 27, 2005
"Vathix" <chris@dprogramming.com> wrote in message news:op.sv5s10p1l2lsvj@esi...
> On Sat, 27 Aug 2005 04:47:18 -0400, Walter <newshound@digitalmars.com> wrote:
>
> > I've put up a strawman proposal for embedding documentation in comments
> > at
> > www.digitalmars.com/d/doc.html
>
> Page not found.

Oops. It's there now.


August 27, 2005
On Sat, 27 Aug 2005 04:47:18 -0400, Walter <newshound@digitalmars.com> wrote:

> I've put up a strawman proposal for embedding documentation in comments at
> www.digitalmars.com/d/doc.html

Not bad. What I don't seem to like is the "Params:" alternate method of documenting a function's parameters. I don't like the idea of lining things up in order for it to be parsed correctly. It leads to tabs/spaces conflicts. How about prefixing the identifier with @ and it will continue until another @identifier or the end of the comment. People will still probably line them up, but using tabs and spaces however they please.

A suggestion I have is a way to document if a function should be used as a property and not a function. Perhaps "Property: get" / "Property: set", that way a documentation generator could group them and strip the () from the display to further discourage them from being used as functions.
August 27, 2005
"Walter" <newshound@digitalmars.com> wrote in message news:depaee$fre$1@digitaldaemon.com...
> I've put up a strawman proposal for embedding documentation in comments at www.digitalmars.com/d/doc.html

Nice. Some thoughts:
- how about also having a License: section or something for any legal stuff
that users need to know about.
- allowing a wiki markup instead of embedded html solves the problem of just
how much html is supported by a given tool. I'm just thinking of italics,
bold, bold-italics, list and numbered lists and maybe a few others that I
can't think of now. like monospaced-fonts or code.
- should the Code block be Example? I'm not sure what kind of code to put in
Code.


August 27, 2005
"Vathix" <chris@dprogramming.com> wrote in message news:op.sv5uwjdol2lsvj@esi...
> On Sat, 27 Aug 2005 04:47:18 -0400, Walter <newshound@digitalmars.com> wrote:
>
>> I've put up a strawman proposal for embedding documentation in comments
>> at
>> www.digitalmars.com/d/doc.html
>
> Not bad. What I don't seem to like is the "Params:" alternate method of documenting a function's parameters. I don't like the idea of lining things up in order for it to be parsed correctly. It leads to tabs/spaces conflicts. How about prefixing the identifier with @ and it will continue until another @identifier or the end of the comment. People will still probably line them up, but using tabs and spaces however they please.

It's true that spacing is an issue but @ symbols are ugly and I'm glad Walter is avoiding them. How about "more leading whitespace than the previous line" means a continued param doc.

> A suggestion I have is a way to document if a function should be used as a property and not a function. Perhaps "Property: get" / "Property: set", that way a documentation generator could group them and strip the () from the display to further discourage them from being used as functions.

I agree properties should be special. Your idea of property get/set seems fine to me.


August 27, 2005
On Sat, 27 Aug 2005 08:13:28 -0400, Ben Hinkle <ben.hinkle@gmail.com> wrote:

>
> "Vathix" <chris@dprogramming.com> wrote in message
> news:op.sv5uwjdol2lsvj@esi...
>> On Sat, 27 Aug 2005 04:47:18 -0400, Walter <newshound@digitalmars.com>
>> wrote:
>>
>>> I've put up a strawman proposal for embedding documentation in comments
>>> at
>>> www.digitalmars.com/d/doc.html
>>
>> Not bad. What I don't seem to like is the "Params:" alternate method of
>> documenting a function's parameters. I don't like the idea of lining
>> things up in order for it to be parsed correctly. It leads to tabs/spaces
>> conflicts. How about prefixing the identifier with @ and it will continue
>> until another @identifier or the end of the comment. People will still
>> probably line them up, but using tabs and spaces however they please.
>
> It's true that spacing is an issue but @ symbols are ugly and I'm glad
> Walter is avoiding them. How about "more leading whitespace than the
> previous line" means a continued param doc.

All right, but that suggests you have to keep on adding more and more whitespace for more lines, like

/** This is my function.
 * Params:
 *     fp    File pointer
 *     name  File name and
 *           more. Some more
 *            can go here but
 *             you have to add
 *              more and more
 *               spaces.
 */

"more leading whitespace than the line containing the identifier" or similar seems better.
August 27, 2005
"Vathix" <chris@dprogramming.com> wrote in message news:op.sv53g81jl2lsvj@esi...
> On Sat, 27 Aug 2005 08:13:28 -0400, Ben Hinkle <ben.hinkle@gmail.com> wrote:
>
>>
>> "Vathix" <chris@dprogramming.com> wrote in message news:op.sv5uwjdol2lsvj@esi...
>>> On Sat, 27 Aug 2005 04:47:18 -0400, Walter <newshound@digitalmars.com> wrote:
>>>
>>>> I've put up a strawman proposal for embedding documentation in comments
>>>> at
>>>> www.digitalmars.com/d/doc.html
>>>
>>> Not bad. What I don't seem to like is the "Params:" alternate method of
>>> documenting a function's parameters. I don't like the idea of lining
>>> things up in order for it to be parsed correctly. It leads to
>>> tabs/spaces
>>> conflicts. How about prefixing the identifier with @ and it will
>>> continue
>>> until another @identifier or the end of the comment. People will still
>>> probably line them up, but using tabs and spaces however they please.
>>
>> It's true that spacing is an issue but @ symbols are ugly and I'm glad Walter is avoiding them. How about "more leading whitespace than the previous line" means a continued param doc.
>
> All right, but that suggests you have to keep on adding more and more whitespace for more lines, like
>
> /** This is my function.
>  * Params:
>  *     fp    File pointer
>  *     name  File name and
>  *           more. Some more
>  *            can go here but
>  *             you have to add
>  *              more and more
>  *               spaces.
>  */
>
> "more leading whitespace than the line containing the identifier" or similar seems better.

whoops - good point :-)


August 27, 2005
Excelent ideas. Are you planning on having the compiler produce the documentation itself? That would be killer!


Walter wrote:
> I've put up a strawman proposal for embedding documentation in comments at
> www.digitalmars.com/d/doc.html
> 
> 
August 27, 2005
Walter wrote:
> I've put up a strawman proposal for embedding documentation in comments at
> www.digitalmars.com/d/doc.html
> 
> 

Nice ideas, and the code/doc looks pretty clean too.

One objection: the first form of param documentation looks ugly (to me):
void foo(
	int x,  // is for this
	int y   // is for that
	)


And for the 'Deprecated', it seems redundant, the compiler already knows the function is deprecated.
I think the only thing to document about a deprecated function is why it's deprecated, and what should we use instead of it.

/**
    Use bar() instead
*/
deprecated void foo() { ... }

Embedded HTML doesn't look very good :/


« First   ‹ Prev
1 2 3 4 5 6 7 8 9 10 11