Enhancement: issue error on all public functions that are missing ddoc sections

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Thu Mar 19 15:03:14 PDT 2015


On 3/19/2015 2:43 AM, deadalnix wrote:
> Here is what will pass review :

Presumably the reviewers will have some common sense and taste.

> class User {
>     /**
>      * Accessor to get the id of the user.
>      *
>      * @return : the id of the user
>      */
>     uint getUserID() { ... }
>
>     /**
>      * Accessor to get the name of the user.
>      *
>      * @return : the name of the user
>      */
>     string getName() { ... }

Accessor functions that merely return a field variable are bull anyway.


> This is very popular in "enterprise" code, and there is a reason everybody hates
> it.

I think the problem is more with the desire to have noise wrappers like:

     int foo;
     int getFoo() { return foo; }


More information about the Digitalmars-d mailing list