4 ms·
I completely agree about header files. Having all of the type signatures and argument names associated with a library in one place is great.
by neutronicus 14y ago
I completely agree about header files. Having all of the type signatures and argument names associated with a library in one place is great.
- pjmlp 14y agoHeader files are a relic from the 70's, which was replaced by sane module systems in the 80's. Only stone age languages insist in using header files.
- frou_dh 14y agoWhen using an IDE, that seems the type of thing that should be automatically derived from code rather having to be written and maintained by hand. i.e. More suited to some kind of read-only overview browser than just another finicky text file.
- cageface 14y agoAbsolutely. I recently started working on an Android port of an iOS app of mine and it's a big time saver letting the tools take care of these details. Not to mention how much more powerful refactoring tools can be when they don't have to worry about a preprocessor.
- to3m 14y agoVisual Studio will generate class declarations for CLR classes from the associated metadata, if you do a `go to declaration' on a system class. Something similar could be done with Objective-C, judging by the output of the `class-dump' tool (see http://www.codethecode.com/projects/class-dump/ http://www.codethecode.com/projects/class-dump/). If you run it on an app's private frameworks - I hear that Xcode 4 might demonstrate the principle - you'll get back a surprisingly complete set of interface, method and ivar declarations. This suggests that if the will were there, we could do away with header files, even for libraries shipped as compiled objects. It works well for the CLR.