Documentation Layout

Nathan M. Swan nathanmswan at gmail.com
Wed Mar 28 17:58:14 PDT 2012


On Wednesday, 28 March 2012 at 22:43:19 UTC, foobar wrote:
> Categories - worst idea ever.
>
> What's better:
> int a; // this is size
> OR
> int size;
>
> Same thing applies here - code MUST be self documenting as much 
> as possible.

But categories are still useful, e.g., when you want a function 
in std.algorithm that looks for a specific element. It could be 
"search" or "find" or "firstElemSatisfyingCondition", and even 
though those are all self documenting, it would be a pain to look 
through the list of functions in alphabetical order. The use of 
categories narrows your search for the function down 20%.

NMS


More information about the Digitalmars-d mailing list