Skip to content

Conversation

@nsfisis
Copy link
Contributor

@nsfisis nsfisis commented Jan 13, 2025

概要

更新履歴などに書かれる "A now has a tentative return of B." という定型文の訳を、「A の仮の戻り値の型が、B になりました。」に統一しました。

訳語選択の根拠

この文章の訳には、3通りの定型文が存在しました。

  • 「A の仮の戻り値の型が、B になりました。」
  • 「A は、現在暫定的に B を返すようになりました。」
  • 「A は現在、暫定的に B を返しています。」

ReflectionFunctionAbstract::getTentativeReturnType()ReflectionFunctionAbstract::hasTentativeReturnType() での訳語が「仮の戻り値」になっていることから、1番目の文へと統一するのが適切と判断しました。

また、ここでいう "tentative" は、「C で実装された内部関数なので PHP レベルで型宣言がされているわけではないのだが、PHP から見たときの仮の型として一応宣言だけはされている」というような意味で用いられているので、正確さという観点でも1番目の文が適切と考えます。

参考: https://www.php.net/manual/ja/language.oop5.inheritance.php#language.oop5.inheritance.internal-classes

Copy link
Collaborator

@KentarouTakeda KentarouTakeda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます。
こちら、大変助かります。

@KentarouTakeda KentarouTakeda merged commit f3ece8a into php:master Jan 13, 2025
2 checks passed
@nsfisis nsfisis deleted the feature/tentative-return-type branch January 13, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants