extern (D)?

Rob T alanb at ucora.com
Fri Jan 18 10:03:01 PST 2013


On Friday, 18 January 2013 at 04:46:46 UTC, Andrej Mitrovic wrote:
> On 1/18/13, Rob T <alanb at ucora.com> wrote:
>> however I read somewhere that it pretty much does nothing but
>> strip out the comments because it needs the full source code 
>> for
>> a inlining, CTFE, and templates.
>
> There was a recent pull that implemented better header 
> generation
> (https://github.com/D-Programming-Language/dmd/pull/1487), it 
> will be
> in the 2.062 release (which might be a long time from now but 
> it's
> worth knowing). It's probably doing a better job at hiding
> implementation details.

That pull will make things better, but it doesn't go far enough. 
For example it would be nice to have extra control, such as the 
option of telling the compiler to leave out templates and warn or 
error if auto returns are discovered (or better, convert the auto 
into a known type).

The idea for some people is to hide as much implementation 
details as possible, so the compiler should be made to help do 
that kind of job. Also users may want to leave out templates in 
some cases. As it is, we have to hack them out manually, but that 
is a time waster and error prone.

I wonder if the UDA concept can be used to mark things so that 
they get left out of the DI or included in the DI?

Ultimately the module system itself should be given another 
shake, I find that it is too simplistic. It would be far better 
if the module system had true interfacing constructs so that the 
programmer can specify what gets placed into the DI.

--rt


More information about the Digitalmars-d-learn mailing list