Proposed improvements to the separate compilation model

Rob T alanb at ucora.com
Tue Mar 5 12:23:24 PST 2013


On Tuesday, 5 March 2013 at 18:16:41 UTC, Dmitry Olshansky wrote:
>
> Leverage UDAs ?
>

Yes that's one possible method, tagging the interface with 
recognized attributes that guide the generation of the .di files. 
If the generation is smart enough that we can do without, even 
better.

The other need expressed in here is to have a means to benefit 
from a separation of interface from implementation inside the 
source base. I'll admit that bundling the two together is 
somewhat of a pain as it can hide away the interface. However I 
wonder if this is not best served through automatic 
documentation, ie, if the .di generation can figure out the 
interface, then why can't DDoc do it too? Then again, this may be 
more of a coding convenience issue more than a documentation 
issue, so I'm not strongly opposed to separating interface from 
implementation, rather my main concern was seeing manual 
maintenance of .di files being taken seriously. From my POV it's 
akin to having to hex edit your .o files to keep them in sync 
with source code changes.

If there's to be a method of interface-implementation separation, 
I think whatever is devised should minimize code duplication as 
much as possible, and the .di files should always be generated 
and maintained automatically.

--rt


More information about the Digitalmars-d mailing list