Steven Schveighoffer wrote:
I've never had any problem keeping my .h files in sync with the .c files. Just include the .h and the compiler will barf if they don't match...On Wed, 21 Oct 2009 18:16:48 -0400, AJ <a...@nospam.net> wrote:"Steven Schveighoffer" <schvei...@yahoo.com> wrote in message news:op.u157hfkveav...@localhost.localdomain...On Wed, 21 Oct 2009 17:59:52 -0400, AJ <a...@nospam.net> wrote:Since D has no header files, how does one create "a library" that anotherdeveloper 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 classdata members and methods) and do the implementation (or one can hand it offto 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 thehorse. 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 isgood, exactly for the reasons of usefullness I gave).Separating interface from implementation is good -- but not if you have to repeat the interface (as you do with C++ or C). 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.
Jerome -- mailto:jeber...@free.fr http://jeberger.free.fr Jabber: jeber...@jabber.fr
signature.asc
Description: OpenPGP digital signature