2 ms·
This isn't really an argument for .h files though. .h files are an extra amount of work you have to put in. In the case of plugin APIs, this is work you'd have
by Manishearth 10y ago
This isn't really an argument for .h files though.
.h files are an extra amount of work you have to put in. In the case of plugin APIs, this is work you'd have to put in anyway (for a fraction of the .h files -- the ones which are part of the API). But that work doesn't have to be put in elsewhere.
This is an argument for interface description files for plugins, but that could always have been done by a language with idl files or something. Indeed, apps in most other languages define interfaces via .h files because that's the de-facto plugin API description format, but they don't use .h files everywhere in the source. They only use them where necessary for the API.