3 ms·
> If they're not in the tutorial, examples, or reference, you don't even know they exist. If you use the header file for documentation, and internal methods are
by plorkyeran 12y ago
> If they're not in the tutorial, examples, or reference, you don't even know they exist. If you use the header file for documentation, and internal methods are grouped together beneath the terse comment "internal methods," then why are you calling them?
Autocomplete is a thing. Even if there is a big comment explicitly saying not to use a function, if it doesn't show up in the autocomplete window someone will inevitable use the function anyway (and sometimes even if it does).
- mikestew 12y agoIf I'm reading this correctly, you're saying that someone will use a function for which there is no documentation, no external reference, and the user hasn't even seen the code (since they didn't see the comment saying not to use it)? Just a function name and (maybe) a method signature in the autocomplete? The caller deserves whatever woes befall them.
- epylar 12y ago> The caller deserves whatever woes befall them. Why?
- douche 12y agoThis kind of thing provides endless material for Raymond Chen's blog[1]. It also explains a lot of the insane backwards compatability that is still in Windows. [1]http://blogs.msdn.com/b/oldnewthing/ http://blogs.msdn.com/b/oldnewthing/
- plorkyeran 12y agoYes. All the time, if the name and signature are enough to tell you what it does and how to use it, which is normally considered a good thing.
- quanticle 12y agoThe caller does indeed deserve whatever woes befall them, but sometimes the caller is loud enough, powerful enough, or prominent enough that you have to support them... even when they're bypassing your actual API and hitting your internal methods.
- Sophistifunk 12y agoNot only will they (attempt to) use them, but they will decry your half-assed documentation, and be right to do so.