3 ms·
One critique is that the documenting must duplicate the name and type when it's right there. e.g. // Function: Multiply // Multiplies two integers and retu
by rendall 5y ago
One critique is that the documenting must duplicate the name and type when it's right there. e.g.
// Function: Multiply
// Multiplies two integers and returns the result.
int Multiply (int x, int y)
{ return x * y; }
JSDoc, by contrast, uses the code itself and it's not necessary to duplicate the name.
/** Multiplies two integers and returns the result. */
int Multiply (int x, int y)
{ return x * y; }
I might recommend the addition of this feature, if I understood the intent of the project correctly.
- NaturalDocsGreg 5y agoFor languages that have a custom parser written for it (currently only C#) you can absolutely omit the first line. For all other languages it needs the line to know what its documenting and how to include the prototype since it's relying on a more generic parser. This lets it work with almost any language, and you can even add support for new languages just by editing a text file, but it admittedly makes it more verbose.