3 ms·
I'm with the author. Also, > Header files. Wait, what?!? Yes, I prefer having header files to not having header files. I couldn't agree more. Header files a
by tempodox 3y ago
I'm with the author. Also,
> Header files. Wait, what?!? Yes, I prefer having header files to not having header files.
I couldn't agree more. Header files are searchable, by arbitrary independent tools, and support discoverability. Generated Swift interface docs force you into Xcode, yield zero discoverability and can be searched only after you generate them and have them open in the editor. You're generally much more dependent on Apple's shitty incomplete documentation.
- bluejekyll 3y agoIs this a tooling issue? For example, I absolutely love the rustdoc tool `cargo doc` which generates nice searchable docs. I find this has more value to me than header files. Does swift have something similar, or is it only Xcode that gives you a doc feature? And to expand on this, I get docs for all the dependencies of the project generated at the same time, and can optionally generate docs for non-public interfaces.
- KerrAvon 3y agoYes, it's a tooling issue. Xcode is horrifically slow at generating the docs.
- kzrdude 3y agoNice obeservation, cargo doc is Rust's header files. When developing a library in Rust, I usually use cargo doc to "see the crate from the user's perspective".
- elcritch 3y agoThat explains why so many docs for Rust packages are just a spew of types and traits. From the user perspective I really dislike just being thrown a bunch of types with minimal to no actual docs. It seems more common with Cstyle headers to add docs.
- kzrdude 3y agoIf it looks like that, then I think those developers did not take a look using the cargo doc perspective. I definitely do that to add docs in the right places. And warn(missing_docs) is good to use too (warn on any public item).