6 ms·
Half a decade? Man, I was hoping for something better than header files in the 90s!
by bmurphy1976 5y ago
Half a decade? Man, I was hoping for something better than header files in the 90s!
- zigzag312 5y agoSo, for nearly one third of a century :P
- lelanthran 5y ago> Half a decade? Man, I was hoping for something better than header files in the 90s! It's hard to get something better than header files; modules don't provide the same functionality, as far as I can see. I think headers will remain purely for practical purposes.
- pjmlp 5y agoSince Mesa languages with modules also support conditional compilation and file inclusion. Check Modula-2 documentation, or Turbo Pascal for MS-DOS or Apple's Object Pascal.
- lelanthran 5y agoWell I did say "for practical purposes" :-) Header files serve as a library interface for almost all languages out there, and are so simple that for the most part they can automatically be used from other languages to access the library. C++ Modules, as far as I can tell anyway, are for C++ programs to use only, to access C++-only libraries.
- pjmlp 5y agoSince when do other languages compile C header files?
- lelanthran 5y ago> Since when do other languages compile C header files? I dunno, I never claimed that.
- pjmlp 5y ago> Header files serve as a library interface for almost all languages out there, and are so simple that for the most part they can automatically be used from other languages to access the library
- lelanthran 5y ago> Header files serve as a library interface for almost all languages out there, and are so simple that for the most part they can automatically be used from other languages to access the library What does that have to do with compilation? I use C headers all the time from Java projects and I've never had to compile them. Not manually anyway. Headers are usable from Python, Tcl, Lua, Java, C# and a whole lot of other languages that similarly don't require compilation and don't require much effort further than issuing a single command. The modules being proposed as a replacement for headers cannot, and will never, provide this functionality.
- pjmlp 5y agoHow do you make javac or csc read stdio.h?
- lelanthran 5y ago> How do you make javac or csc read stdio.h? Why would I need to? Swig execution is part of the build process (a dependency). We seem to be arguing past each other: my original point is that modules are not a complete replacement for headers because headers are used to specify an interface that all languages can, right now, in a very practical sense, use. In practical terms, headers work as an interface to the rest of the system that all other languages currently consume. Modules cannot (and there is no indication that they ever will be able to) provide this functionality.