No header files?

AJ aj at nospam.net
Wed Oct 21 16:56:38 PDT 2009


"Jason House" <jason.james.house at gmail.com> wrote in message 
news:hbo2ih$2oii$1 at digitalmars.com...
> AJ Wrote:
>
>>
>> "Steven Schveighoffer" <schveiguy at yahoo.com> wrote in message
>> news:op.u157hfkveav7ka at localhost.localdomain...
>> > On Wed, 21 Oct 2009 17:59:52 -0400, AJ <aj at nospam.net> wrote:
>> >
>> >> Since D has no header files, how does one create "a library" that 
>> >> another
>> >> developer can use without exposing the implementation?
>> >
>> > try dmd -H.
>> >
>> > .di files are D header files, basically used for the reason you 
>> > specify.
>>
>> OK, so header files can be generated. The thing is though, when I am
>> designing at the code level, I start with the declarations (such as class
>> data members and methods) and do the implementation (or one can hand it 
>> off
>> to someone else) afterwards. That serves as the "blue print" for further
>> development and remains as first level of documentation as well. Working
>> with just "implementation files" seems to be putting the cart before the
>> horse. While eliminating something unnecessary is something to strive 
>> for, I
>> don't think header files are unnecessary in the development process 
>> (i.e., I
>> don't think that relegating them to just the situation given with my OP 
>> is
>> good, exactly for the reasons of usefullness I gave).
>>
>>
>
> I think you keep a very structured development style that few share.
> Nothing stops you from writing a header-file-like .d file and then hand it
> off for someone to fill in the methods, etc...

Would I have to use a dmd-generated one to distribute to users of my library 
though? Are generated .di files something different or more than what I'd 
write in a C/C++ .h?






More information about the Digitalmars-d mailing list