D - Header files???
- Erik Rounds (9/9) Aug 22 2001 I noticed that D is not planning to support header files. Will it be
- Brent Schartung (5/14) Aug 23 2001 Not to mention that closed-source libraries are often distributed as hea...
- Walter (4/20) Aug 24 2001 Actually, D will work if you make a "header" by replacing the function
- Erik Rounds (5/31) Aug 24 2001 I'm glad to hear that. Will there be different file extentions for
- Russ Lewis (5/8) Aug 24 2001 I think that they all should be .d files - you don't really want to make...
- Sean L. Palmer (16/24) Oct 23 2001 And what would be even better than that would be to just distribute the ...
- Walter (6/33) Feb 04 2002 Can't do that unless you're willing to define your own .o format. This i...
- Pavel Minayev (6/9) Feb 04 2002 What about creating a separate, binary file that'd contain interface
- Walter (6/15) Feb 04 2002 is
- Pavel Minayev (3/5) Feb 04 2002 Okay. I can live without it, all my libs are open-sourced anyhow =)
I noticed that D is not planning to support header files. Will it be more like Java where both the declarations and definitions are in the same file. If so, I think that could be a big mistake. I personally file header files useful as a visual interface to my classes and functions without having to pour through so much miscilanious implementation code. Also header files are needed for distribution of libraries where you don't feel like distributing your source code. Anyway, just thought I'd add my two cents. Everything else about D seems real nice. Thanks.
Aug 22 2001
Not to mention that closed-source libraries are often distributed as headers and compiled object code. Would it be possible for D to read the implementation/source code and then generate a 'header' for purposes of distribution & linking? - BrentI noticed that D is not planning to support header files. Will it be more like Java where both the declarations and definitions are in the same file. If so, I think that could be a big mistake. I personally file header files useful as a visual interface to my classes and functions without having to pour through so much miscilanious implementation code. Also header files are needed for distribution of libraries where you don't feel like distributing your source code. Anyway, just thought I'd add my two cents. Everything else about D seems real nice. Thanks.
Aug 23 2001
Actually, D will work if you make a "header" by replacing the function bodies with ;. It's just that you don't have to do it that way. Brent Schartung wrote in message <9m4em5$6jo$1 digitaldaemon.com>...Not to mention that closed-source libraries are often distributed asheadersand compiled object code. Would it be possible for D to read the implementation/source code and then generate a 'header' for purposes of distribution & linking? - BrentI noticed that D is not planning to support header files. Will it be more like Java where both the declarations and definitions are in the same file. If so, I think that could be a big mistake. I personally file header files useful as a visual interface to my classes and functions without having to pour through so much miscilanious implementation code. Also header files are needed for distribution of libraries where you don't feel like distributing your source code. Anyway, just thought I'd add my two cents. Everything else about D seems real nice. Thanks.
Aug 24 2001
I'm glad to hear that. Will there be different file extentions for declaration and implementation files or just .d for everything. Perhapse .dh or something. Thanks for the info. Walter wrote:Actually, D will work if you make a "header" by replacing the function bodies with ;. It's just that you don't have to do it that way. Brent Schartung wrote in message <9m4em5$6jo$1 digitaldaemon.com>...Not to mention that closed-source libraries are often distributed asheadersand compiled object code. Would it be possible for D to read the implementation/source code and then generate a 'header' for purposes of distribution & linking? - BrentI noticed that D is not planning to support header files. Will it be more like Java where both the declarations and definitions are in the same file. If so, I think that could be a big mistake. I personally file header files useful as a visual interface to my classes and functions without having to pour through so much miscilanious implementation code. Also header files are needed for distribution of libraries where you don't feel like distributing your source code. Anyway, just thought I'd add my two cents. Everything else about D seems real nice. Thanks.
Aug 24 2001
Erik Rounds wrote:I'm glad to hear that. Will there be different file extentions for declaration and implementation files or just .d for everything. Perhapse .dh or something.I think that they all should be .d files - you don't really want to make a distinction between normal source and these headers. In fact, these headers might be a mix of simple source code (wrappers) and links to external functions. Publish a .d file for the declarations, and a .o file for linking.
Aug 24 2001
And what would be even better than that would be to just distribute the .o file, and have the compiler automatically open it up and figure out the class and function declarations. The newfangled IDE could also open up a D .o file and show browse information, inheritance tree or whatever. Old school programmers on out-of-date computers could always ship a "fake" header file with their library, so people could check out the interfaces without having to fire up an IDE. Or a command-line tool could "extract" the header from the .o file kinda like dumpbin. Header files are so unnecessary it hurts. Sean "Russ Lewis" <russ deming-os.org> wrote in message news:3B8696EE.579EC10E deming-os.org...Erik Rounds wrote:Perhapse .dhI'm glad to hear that. Will there be different file extentions for declaration and implementation files or just .d for everything.headersor something.I think that they all should be .d files - you don't really want to make a distinction between normal source and these headers. In fact, thesemight be a mix of simple source code (wrappers) and links to externalfunctions.Publish a .d file for the declarations, and a .o file for linking.
Oct 23 2001
Can't do that unless you're willing to define your own .o format. This is infeasable for me as a matter of I don't have the resources to do it. Note that Java did do this, with .class files. "Sean L. Palmer" <spalmer iname.com> wrote in message news:9r3hj6$btm$1 digitaldaemon.com...And what would be even better than that would be to just distribute the .o file, and have the compiler automatically open it up and figure out the class and function declarations. The newfangled IDE could also open up a D .o file and show browse information, inheritance tree or whatever. Old school programmers on out-of-date computers could always ship a "fake" header file with their library, so people could check out the interfaces without having to fire up an IDE. Or a command-line tool could "extract" the header from the .o file kinda like dumpbin. Header files are so unnecessary it hurts. Sean "Russ Lewis" <russ deming-os.org> wrote in message news:3B8696EE.579EC10E deming-os.org...aErik Rounds wrote:Perhapse .dhI'm glad to hear that. Will there be different file extentions for declaration and implementation files or just .d for everything.or something.I think that they all should be .d files - you don't really want to makedistinction between normal source and these headers. In fact, theseheadersmight be a mix of simple source code (wrappers) and links to externalfunctions.Publish a .d file for the declarations, and a .o file for linking.
Feb 04 2002
"Walter" <walter digitalmars.com> wrote in message news:a3ln64$tsg$1 digitaldaemon.com...Can't do that unless you're willing to define your own .o format. This is infeasable for me as a matter of I don't have the resources to do it. Note that Java did do this, with .class files.What about creating a separate, binary file that'd contain interface for the module (*.dmi), auto-generated on compilation. It'd load faster, and would make distribution of source codes and writing of "fake" module headers unnecessary.
Feb 04 2002
"Pavel Minayev" <evilone omen.ru> wrote in message news:a3mpf2$1glq$1 digitaldaemon.com..."Walter" <walter digitalmars.com> wrote in message news:a3ln64$tsg$1 digitaldaemon.com...isCan't do that unless you're willing to define your own .o format. ThisNoteinfeasable for me as a matter of I don't have the resources to do it.That's certainly possible, but will have to wait until I get the language working fully. -Walterthat Java did do this, with .class files.What about creating a separate, binary file that'd contain interface for the module (*.dmi), auto-generated on compilation. It'd load faster, and would make distribution of source codes and writing of "fake" module headers unnecessary.
Feb 04 2002
"Walter" <walter digitalmars.com> wrote in message news:a3mqmt$1hlj$1 digitaldaemon.com...That's certainly possible, but will have to wait until I get the language working fully. -WalterOkay. I can live without it, all my libs are open-sourced anyhow =)
Feb 04 2002