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

[lib] Harmonize punctuation of 'Effects: Equivalent to' #1815

Merged
merged 1 commit into from Nov 25, 2017

Conversation

jensmaurer
Copy link
Member

Fixes #1119.

@tkoeppe
Copy link
Contributor

tkoeppe commented Nov 16, 2017

Thanks -- but all editorial changes are frozen until the motions are in. I think we'll get new cases like this coming in, so I will ask you to recheck at that point.

@jensmaurer
Copy link
Member Author

See #1806 for a competing pull request.

@@ -12823,7 +12823,7 @@

\begin{itemdescr}
\pnum
\effects Equivalent to \tcode{pathobject = p},
\effects Equivalent to: \tcode{pathobject = p},
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want colons here? What follows is an expression, not a statement, non?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, it's not just the expression: all of what follows is part of the "Equivalent to". It seemed prudent to add the colon to highlight that fact.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, I thought it reads nicer without the colon, like a normal sentence. @zygoloid, a native speaker's opinion?

Copy link
Member Author

Choose a reason for hiding this comment

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

Why do we add the colon for the "statement" case, then? I thought because "something big" was coming along.

Copy link
Contributor

Choose a reason for hiding this comment

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

I always thought it was because of the grammatical nature of what follows: the colon separates sentences, or "statements", if you will. If you just have an expression, it's naturally an object of the current sentence.

Copy link
Contributor

Choose a reason for hiding this comment

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

(I'm happy to merge everything except these two, which I'd like discussed further.)

Copy link
Member Author

Choose a reason for hiding this comment

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

I've dropped these two contentious changes.

@@ -2449,7 +2425,7 @@

\begin{itemdescr}
\pnum
\effects Equivalent to \tcode{insert(pos, basic_string(n, c))}.
\effects Equivalent to: \tcode{return insert(pos, basic_string(n, c));}
Copy link
Contributor

Choose a reason for hiding this comment

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

Now the \returns below is redundant.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.


\pnum\returns \tcode{*this}.
\pnum\effects Equivalent to:
\tcode{shared_ptr(r).swap(*this); return *this;}

Copy link
Contributor

Choose a reason for hiding this comment

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

We lost the \returns here?

Copy link
Member Author

Choose a reason for hiding this comment

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

No. Look at the end of line 9443; there's a second statement, which happens to be a return statement.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh eek. Can we make that a codeblock then?

Copy link
Member Author

Choose a reason for hiding this comment

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

Or keep the \returns, maybe?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. I'm not keen on getting overly creative in compressing stuff. Readability is important. The return *this = that; is borderline, too (but I was going to let it slide).

Copy link
Member Author

Choose a reason for hiding this comment

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

I've undone the changes in this area.

\pnum
\returns \tcode{*this}.
\effects Equivalent to:
\tcode{shared_ptr(std::move(r)).swap(*this); return *this;}
Copy link
Contributor

Choose a reason for hiding this comment

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

Here too.

Copy link
Member Author

Choose a reason for hiding this comment

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

No, see above.

@jensmaurer
Copy link
Member Author

Rebased + contentious change dropped.

@tkoeppe tkoeppe merged commit efdda2b into cplusplus:master Nov 25, 2017
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.

None yet

2 participants