为什么 Method#arity 被称为 arity?

发布于 2024-07-29 04:07:10 字数 129 浏览 2 评论 0原文

在 Ruby 中,我知道 Method#arity 将返回一个表示方法接受的参数数量的值,但我不知道为什么它被称为 arity。 任何人都可以深入了解为什么它会存在于如此看似随机的命名空间中吗? 另外,你怎么发音?

In Ruby, I know that Method#arity will return a value representing the number of arguments accepted by a method, however I do not know why it is called arity. Can anyone provide some insight into why it would exist in such a seemingly random namespace? Also, how do you pronounce it?

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

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

发布评论

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

评论(1

童话 2024-08-05 04:07:10

因为这实际上就是它的名字。 http://en.wikipedia.org/wiki/Arity

我发音为 AIR-i-TEE就像极性一样。

Because that's actually the name for it. http://en.wikipedia.org/wiki/Arity

I pronounce it AIR-i-TEE like in polarity.

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