scope keyword - a maintenance nightmare?

Carlos Santander csantander619 at gmail.com
Sat Aug 18 07:38:30 PDT 2007


Guenther Brunthaler escribió:
> Deewiant Wrote:
> 
>> http://www.digitalmars.com/d/dcompiler.html#interface_files
>> 
>> Unfortunately, this only separates interface descriptions from object code.
>> What
> 
> Thank you for pointing that out!
> 
> It's a new feature too which I did not know about yet. It certainly wasn't
> there when I evaluated the language the first time.
> 
> Sounds pretty useful. Seems to be more or less what I wanted.
> 
> However, there is one thing left in the linked web page above like which I
> still find rather disturbing:
> 
>> But they are not required in the way that C++ header files are, and they
>> are not part of the D language. They are a feature of the compiler, and
>> serve only as an optimization of the build process.
> 
> If they are not part of the language, then one is at the mercy of a compiler
> to provide them! And in fact, every compiler could do it its own way, using a
> different layout or even a different syntax if it wants to.
> 
> It therefore seems more like the "precompiled header files" feature of some
> C/C++ compilers to me: While clearly useful, not all compilers do support it,
> and precompiled header files are typically not compatible between the
> different vendor's implementations.
> 
> So let's hope .di files actually become part of the D language standard in a
> future revision of the language!

I'm guessing all it means is that you don't need to provide that feature in 
order to create a D compiler. As Lutger said, if your compiler doesn't have that 
feature, you can use an external tool that has it. In fact, I think that's how 
this feature got implemented in the first place, but I'm not 100% sure.

-- 
Carlos Santander Bernal



More information about the Digitalmars-d mailing list