Phobos classes member declaration order

Sean Kelly sean at invisibleduck.org
Fri May 13 14:51:54 PDT 2011


On May 13, 2011, at 1:10 PM, Alexander wrote:

> Is there any particular reason to declare class members in the middle of the class, *after* they are referenced many times? core.thread is an example.

I generally just declare the interface before implementation.  Someone inspecting the code should care more about what they can call than how it works.

> This makes some difficulties to find where they are defined. Compiler doesn't care, but humans do :)

Bottom of the class :-)


More information about the Digitalmars-d mailing list