Skip to content

Switches to positive wording for all rules besides 2.3, #200

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

Merged
merged 1 commit into from
Jan 22, 2015

Conversation

viktorklang
Copy link
Contributor

simply because I could not find appropriate wording.

NOTE: No intentional semantical changes have been made. If you find issues, please, please, please let me know

Harmonises the use of "call" and "invoke" to use "call" in all places
where "invoke" was used.

@reactive-streams/contributors Could you please sanity check the changes proposed here? Thanks!
Please vote/comment before the 21st of January (as always, if you need more time let us know)

@@ -134,11 +134,11 @@ public interface Subscription {

| ID | Rule |
| ------------------------- | ------------------------------------------------------------------------------------------------------ |
| <a name="3.1">1</a> | `Subscription.request` or `Subscription.cancel` MUST not be called outside of its `Subscriber` context. A `Subscription` represents the unique relationship between a `Subscriber` and a `Publisher` [see [2.12](#2.12)] |
| <a name="3.1">1</a> | `Subscription.request` and `Subscription.cancel` MUST only be called inside of its `Subscriber` context. A `Subscription` represents the unique relationship between a `Subscriber` and a `Publisher` [see [2.12](#2.12)] |
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switched from or to and here, since that was the intent. Is it clearer?

Copy link
Member

Choose a reason for hiding this comment

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

yes, this is better

@viktorklang viktorklang force-pushed the wip-197-positive-wording-√ branch from 182ab29 to 208e778 Compare January 15, 2015 13:16
| <a name="3.4">4</a> | `Subscription.request` SHOULD NOT synchronously perform heavy computations that would impact its callers responsivity |
| <a name="3.5">5</a> | `Subscription.cancel` MUST NOT synchronously perform heavy computations, MUST be idempotent and MUST be thread-safe |
| <a name="3.3">3</a> | `Subscription.request` MUST only allow bounded recursion such as `Subscriber.onNext` -> `Subscription.request` -> `Subscriber.onNext` |
| <a name="3.4">4</a> | `Subscription.request` SHOULD respect the responsivity of its caller by returning in a timely manner |
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reason for the change here is to put the focus on the responsivity not on how "heavy" a computation may or may not be.

Copy link
Member

Choose a reason for hiding this comment

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

Should we keep “performing heavy computations” as an undesirable example in parentheses?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Footnote?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding footnote

@rkuhn
Copy link
Member

rkuhn commented Jan 16, 2015

Very good initiative, avoiding negation makes the intent clearer in all those cases.

@drewhk
Copy link
Contributor

drewhk commented Jan 16, 2015

LGTM

@viktorklang
Copy link
Contributor Author

@rkuhn Thanks for the feedback, I owe most of it to @DougLea for not only raising the issue but also suggesting how to reword it.

@viktorklang viktorklang force-pushed the wip-197-positive-wording-√ branch 2 times, most recently from 18cde01 to 0632c9f Compare January 16, 2015 10:33
simply because I could not find appropriate wording.

NOTE: No semantical changes have been made AFAICT.

Harmonises the use of "call" and "invoke" to use "call" in all places
where "invoke" was used.

Adds a couple of footnotes to `Subscription` rules to keep the rules
free from examples.
@viktorklang viktorklang force-pushed the wip-197-positive-wording-√ branch from 0632c9f to db71dfe Compare January 16, 2015 10:34
[<a name="footnote-3-1">1</a>] : As it is not feasibly reachable with current or forseen hardware within a reasonable amount of time (1 element per nanosecond would take 292 years) to fulfill a demand of 2^63-1.
[<a name="footnote-3-1">1</a>] : An example for undesirable synchronous, open recursion would be `Subscriber.onNext` -> `Subscription.request` -> `Subscriber.onNext` -> …, as it very quickly would result in blowing the calling Thread´s stack.

[<a name="footnote-3-2">2</a>] : Avoid heavy computations and other things that would stall the caller´s thread of execution
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rkuhn This good?

@viktorklang viktorklang mentioned this pull request Jan 19, 2015
@viktorklang
Copy link
Contributor Author

@reactive-streams/contributors Merging!

viktorklang added a commit that referenced this pull request Jan 22, 2015
Switches to positive wording for all rules besides 2.3,
@viktorklang viktorklang merged commit 13ddd32 into master Jan 22, 2015
@viktorklang viktorklang deleted the wip-197-positive-wording-√ branch January 22, 2015 12:34
@viktorklang viktorklang added this to the 1.0.0.RC2 milestone Jan 22, 2015
@viktorklang viktorklang self-assigned this Jan 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants