Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一部の「副作用」を「エフェクト」に変更? #585

Closed
smikitky opened this issue May 19, 2023 · 2 comments
Closed

一部の「副作用」を「エフェクト」に変更? #585

smikitky opened this issue May 19, 2023 · 2 comments
Labels
workflow Working environment improvements including linting and CSS styles

Comments

@smikitky
Copy link
Member

smikitky commented May 19, 2023

"(side) effect" をどう翻訳するかはいつも悩むのですが、旧ドキュメントでは原文が "side effect" であろうと "effect" であろうととにかく一貫して「副作用」と訳す方針にしていました。理由は以下の通りです。

  • 原文ドキュメントで "side effect" と "effect" を一貫性のある基準で区別して使っているように思えない。むしろ同一視するような記載もある。例えば旧サイトの useEffect の説明には

    Data fetching, setting up a subscription, and manually changing the DOM in React components are all examples of side effects. Whether or not you’re used to calling these operations “side effects” (or just “effects”), ...

    とあり、effect と side effect は事実上同じものであり単に effect の方が短くて便利から使うよ、という扱いに見える。

  • 英語話者がどう感じるかはともかく、日本語訳がランダムに「作用」だったり「副作用」だったりすると明らかに混乱を招くので、何らかの統一は要る。

  • 初学者がどう感じるかはともかく、プログラミング(特に関数型プログラミング)の文脈において副作用の定義とは昔からこれなので、useEffect がやっていることは(side がなくとも)「作用」より「副作用」と呼ぶことが妥当である。


ところが新サイトでは Synchronizing with Effects で以下の方針が明記されており、わりと徹底されているように見えます。

Here and later in this text, capitalized “Effect” refers to the React-specific definition above, i.e. a side effect caused by rendering. To refer to the broader programming concept, we’ll say “side effect”.

なんなら以下のような文章も出てきます。今の基準だと「副作用によって副作用を指定できます」と翻訳することになってしまいます。

Effects let you specify side effects that are caused by rendering itself, rather than by a particular event.

すべて見ていませんが、少なくとも useEffect リファランスでは、上記方針は守られています。

原文が side effectEffect をこれだけ意図的に区別して書くようになった以上、日本語もそれに合わせた区別を導入することは妥当かつ有用なように思えす。

Effect(大文字)の具体的な訳語ですが、とりあえず「エフェクト」が妥当な気がしています。流石に「作用」はやっぱり混乱を招くと思いますし、「関数型言語の研究者ですらこれのことを "副作用" ではなく "エフェクト" と呼んでいる」というような話を見たこともあります。

ただ専門外すぎてこの方針で良いのかよく分かっていません。他の詳しい方の意見を聞きたいです。

@smikitky smikitky changed the title 一部の「副作用」wo「エフェクト」に変更? 一部の「副作用」を「エフェクト」に変更? May 19, 2023
@smikitky smikitky added workflow Working environment improvements including linting and CSS styles help wanted Extra attention is needed labels May 19, 2023
@koba04
Copy link
Member

koba04 commented May 19, 2023

capitalized “Effect” refers to the React-specific definition above,

とあることから区別して Effect をエフェクトとするのは違和感ありません。
確かに使い分けないと Effect 関連のドキュメントで困る場面出てきそうですね。

@smikitky
Copy link
Member Author

ありがとうございます。とりあえず「Effect = エフェクト, side effect = 副作用」の方針で進めてみて問題ありそうならまた相談させてください。

関連する主要記事の翻訳と useEffect リファレンスの修正が終わるまでは open しておきます。

@smikitky smikitky removed the help wanted Extra attention is needed label Jun 1, 2023
@smikitky smikitky closed this as completed Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
workflow Working environment improvements including linting and CSS styles
Projects
None yet
Development

No branches or pull requests

2 participants