On Wed, 21 Oct 2009 19:31:02 -0400, AJ <a...@nospam.net> wrote:


"Steven Schveighoffer" <schvei...@yahoo.com> wrote in message
news:op.u15929x0eav...@localhost.localdomain...

What happens (and being a long-time C++ developer, I've had my fair share
of experience with it) is  that the interface gets out of sync with the
implementation, so weird shit  happens.

I even think d's "editable" interface files are suspect. They can be out
of sync with the object files, and then you have the same problem.  The
best model by far is Java and C# where the object files *are* the
interface files.  Then you only have to worry about documentation being
out of sync.  But at least your programs don't crash randomly for no
reason because the docs are invalid.

What I would suggest is creating stub functions via {} and then when you
go back to fill in the interface, fill in the {} area.  You get the same
effect.

You lose the ability to use, say a class declaration, as the specification
(at least without a sophisitcated, code-folding/code-formatting IDE).

What do you use, Notepad?  Even vi does this now.

In any case, I seldom refer to the source file when I can just look at the docs generated from the comments. If you aren't commenting your API, then I'm not using your lib, so don't even suggest that header files *without comments* are better than auto-generated docs. Header files with comments are trivially transformed into auto-generated docs (one-liner).

-Steve

Reply via email to