3 ms·
Yeah, you can look at it that way, but API documentation is for external users, and I prefer to reduce the number of inline comments, inside the function, which
by ChrisMarshallNY 2y ago
Yeah, you can look at it that way, but API documentation is for external users, and I prefer to reduce the number of inline comments, inside the function, which is not where the external users will be going, anyway.
Most folks will only care about the external name. The internal name is for maintainers. It not only indicates the value is a constant, it also tells you that it has not been altered since entering the function body, and that's pretty important. The "in" prefix regularly saves me from assigning the unprocessed value, instead of one that has had some conditioning applied.
No matter. As long as the warning doesn't bork the build, I can live with it.
I could probably provide protocols for API documentation, but protocols have their own issues[0].
[0] https://littlegreenviper.com/the-curious-case-of-the-protocol-default/ https://littlegreenviper.com/the-curious-case-of-the-protoco...
- saagarjha 2y agoI only skimmed this but you might be able to leverage @_implements here?