new DIP47: Outlining member functions of aggregates
Craig Dillabaugh
cdillaba at cg.scs.carleton.ca
Tue Sep 10 07:06:19 PDT 2013
On Tuesday, 10 September 2013 at 13:49:21 UTC, bearophile wrote:
> Walter Bright:
>
clip
>
>> 3. Parameter names need not match.
>
> This seems bad. What's the rationale for this? (One perhaps
> acceptable solution is to put no parameter names in the
> signature inside the class).
>
I am sure there is a good reason for having no parameter names
in a declaration, but to me this doesn't make much sense.
If people want separate declaration/definition so that they can
get an idea of what a class does, then for non-trivial functions
if the variable names are omitted then your more or less have
to look at the definition anyway.
I must admit whenever I come across such declarations in code I
am reading I always find them kind of irritating.
Apart from functions with say variadic parameter lists, is this
really all that useful?
clip
>
> The D compiler could be modified a bit to generate a bare bones
> documentation even with not even a comment written in the code.
>
> Bye,
> bearophile
I agree on this last point.
More information about the Digitalmars-d
mailing list