Skip to content

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

Closed

Conversation

tatsuya6502
Copy link
Member

@tatsuya6502 tatsuya6502 commented Jun 25, 2016

2017年3月3日に、最新の master (32cc4ab) へ rebase しました。

@tatsuya6502 tatsuya6502 added this to the 1.9 milestone Jun 25, 2016
@tatsuya6502 tatsuya6502 changed the title [WIP] 4.16. Method Syntax (1.9) 4.16. Method Syntax (1.9) Mar 7, 2017
@tatsuya6502 tatsuya6502 requested a review from KeenS March 7, 2017 13:15
@tatsuya6502
Copy link
Member Author

@KeenS レビューをお願いします。

訳文を手直ししています。25行目の leading question の訳や、306行目の to enforce の訳など、意味を変えた所もありますので、全体を通して訳をレビューしていただけると助かります。

Copy link
Member

@KeenS KeenS left a 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` への制約を与えることができます。
さて、私たちは先ほどの要求を守らせるために型システムを使いました。
Copy link
Member

Choose a reason for hiding this comment

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

要求を守らせるために

先に出てきた「要求」は制限したいではなくて自由を得たいという内容だったので
「要求を実現するために」
はいかがでしょうか。

Copy link
Member Author

Choose a reason for hiding this comment

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

@KeenS コメントありがとうございます。自由を得たいということですが、その要求とはどこを指してますか?

Choose a reason for hiding this comment

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

ここではcircleを作成するというのが要求ですから「守らせる」の方が正しいと思います。
ただ日本語的には「満たす」とした方がより自然ではないでしょうか?
いかがでしょうか?

Copy link
Member

Choose a reason for hiding this comment

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

しばらく家を空けていて返信遅れました。

ユーザが Circle を作成する際、関心のあるプロパティだけを指定できるようにしたいとしましょう。
指定がなければ xy0.0radius1.0 にします。

の意図でした。「関心のあるものだけ指定したい」という要求(要件)です。

ただ日本語的には「満たす」とした方がより自然ではないでしょうか?

その方が良いかもしれません。

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.

3 participants