-
Notifications
You must be signed in to change notification settings - Fork 72
4.16. Method Syntax (1.9) #174
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
Conversation
cf29688
to
81e828a
Compare
@KeenS レビューをお願いします。 訳文を手直ししています。25行目の leading question の訳や、306行目の to enforce の訳など、意味を変えた所もありますので、全体を通して訳をレビューしていただけると助かります。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1点コメントしました。ご確認下さい。
また `Circle` に `area()` メソッドを定義しました。 | ||
そして `CircleBuilder` にもう1つ `finalize()` というメソッドを作りました。 | ||
このメソッドはBuilderから最終的な `Circle` を作成します。 | ||
さて、先程の要求を実施するために型システムを使いました。 | ||
`CircleBuilder` のメソッドを好きなように組み合わせ、作る `Circle` への制約を与えることができます。 | ||
さて、私たちは先ほどの要求を守らせるために型システムを使いました。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
要求を守らせるために
先に出てきた「要求」は制限したいではなくて自由を得たいという内容だったので
「要求を実現するために」
はいかがでしょうか。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KeenS コメントありがとうございます。自由を得たいということですが、その要求とはどこを指してますか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここではcircleを作成するというのが要求ですから「守らせる」の方が正しいと思います。
ただ日本語的には「満たす」とした方がより自然ではないでしょうか?
いかがでしょうか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
しばらく家を空けていて返信遅れました。
ユーザが
Circle
を作成する際、関心のあるプロパティだけを指定できるようにしたいとしましょう。
指定がなければx
とy
は0.0
、radius
は1.0
にします。
の意図でした。「関心のあるものだけ指定したい」という要求(要件)です。
ただ日本語的には「満たす」とした方がより自然ではないでしょうか?
その方が良いかもしれません。
Change the comment style to use the same style to other pages.(PR Markdown のフォーマット修正:Method Syntax (1.9) #251 で対応済み)2017年3月3日に、最新の master (32cc4ab) へ rebase しました。