我们放在方法声明上方的文档的正确术语是什么?

发布于 2024-07-06 08:09:20 字数 187 浏览 5 评论 0原文

我正在写一份白皮书,并意识到我不确定我们在定义声明之前作为注释块放置的那种内部文档的官方术语是什么。

最终成为 JavaDoc 成员文档的同样内容。

它不仅仅是内部文档,而且我不确定“标题文档”是一个好术语。

请注意,我正在寻找一个通用术语,而不是特定于某一特定语言(例如 Java/Perl)的术语

I'm writing a whitepaper and realized that I am not sure what the official term is for the kind of internal documentation that we put as a comment block before a declaration of definition.

The same thing that eventually becomes JavaDoc member documentation.

It's not simply internal documentation, and I'm not sure "header documentation" would be a good term.

Note that I'm looking for a general term, not one specific to a particular language (e.g., Java/Perl)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

夏日浅笑〃 2024-07-13 08:09:20

这称为方法规范过程规范。 也就是说,它指定过程的行为而不是实现细节。 一些教科书将其称为方法契约,但这可能有点含糊。

This is called a method specification or procedure specification. That is, it specifies the behaviour of the procedure rather than the implementation details. Some text books refer to it as the contract of the method but that may be a bit ambiguous.

清风挽心 2024-07-13 08:09:20

在我的组织中,我们将其称为方法或函数文档注释。 功能级文档可能是使用更广泛的术语。

At my organization we call it a method or function doc-comment. Function-level documentation is probably the more widely used term.

笑忘罢 2024-07-13 08:09:20

我总是将其称为方法(或函数)注释,以区别于类或文件注释。

I always call it method (or function) comment, to distinguish it from class or file comments.

无声无音无过去 2024-07-13 08:09:20

它通常在专业上称为“要求条款”或“保险条款”。

It's often professionally referred to as a "requirements clause", or an "insurance clause".

清君侧 2024-07-13 08:09:20

我通常将其称为“内联文档”。 对我来说,这就是它的意义 - 事实上,您的文档您的源代码中,因此文档更有可能与代码保持同步。

(当然,这并不能保证,但它确实鼓励程序员吃蔬菜。这意味着开发人员可以同时在同一个地方更改文档行为改变,而不是事后在另一个地方改变。)

I usually refer to it as "inline documentation." To me that's what it's about — the fact that your documentation is in your source code, so there's more of a chance the docs will stay in sync with the code.

(This is no guarantee, of course, but it does encourage programmers to eat their vegetables. It means the developer can change the documentation at the same time and in the same place the behavior changes, rather than after the fact and in another place.)

苏大泽ㄣ 2024-07-13 08:09:20

我称之为代码注释,就这么简单。

I call it code comments, simple like that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文