Skip to content

Conversation

refack
Copy link
Contributor

@refack refack commented Oct 14, 2018

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Oct 14, 2018
@refack refack self-assigned this Oct 14, 2018
@refack refack added the c++ Issues and PRs that require attention from people who are familiar with C++. label Oct 14, 2018
Copy link
Member

Choose a reason for hiding this comment

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

thorw->throw

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack

Copy link
Member

Choose a reason for hiding this comment

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

trasfers->transfers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack

Copy link
Member

Choose a reason for hiding this comment

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

This referred specifically to throwing exceptions, though.

(s/error/exception/ would be a good change here, that’s on me.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you clear this up for me? we can't c++ throw, we need to isolate()->ThrowException() right?

Copy link
Member

Choose a reason for hiding this comment

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

typo: it is (twice)

(and maybe s/essential/necessary/)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack x 3

Copy link
Member

Choose a reason for hiding this comment

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

This seemed sensible in previous form? There’s no reason to use it in our code, and that it’s deprecated/removed is not really of concern if you already know not to use it

Copy link
Contributor Author

@refack refack Oct 14, 2018

Choose a reason for hiding this comment

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

I didn't like the phrasing "Never use", also I do believe an explanation why is nice, since it's very short.

Maybe:

Don't use `std::auto_ptr`.<br/>
It was deprecated in C++11 if favor of `std::unique_ptr`, and later removed from
C++17. `std::unique_ptr` has move semantics instead the of unusual copy
semantics of `std::auto_ptr`.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually we should be able to lint for that. I'll see if I can figure out how to.

Copy link
Member

Choose a reason for hiding this comment

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

nit: blank lines around code block

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack

Copy link
Member

Choose a reason for hiding this comment

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

I’d really like it if we could make these links more expressive instead of just having the item numbers in the text, e.g. Further reading in the [C++ Core Guidelines][ES.47]?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack

Copy link
Contributor

@vsemozhetbyt vsemozhetbyt Oct 14, 2018

Choose a reason for hiding this comment

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

Currently, this and next lines are rendered as one line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack

Copy link
Member

Choose a reason for hiding this comment

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

If you want a list of things, you can juse start lines with * instead of manually inserting line breaks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack x 3

Copy link
Member

Choose a reason for hiding this comment

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

No need for a line break, this makes sense as one paragraph.

Copy link
Member

Choose a reason for hiding this comment

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

ditto here

@refack
Copy link
Contributor Author

refack commented Oct 14, 2018

New format:
image

Explicit <br/> format:
image

🤔

Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

Choose a reason for hiding this comment

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

This somehow reads a bit ambiguous to me now that it's exception, can you change it to JavaScript exception?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ack

Copy link
Member

Choose a reason for hiding this comment

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

Do we need to explain this here? Can we link to some docs somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ack (ish). PTAL

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@joyeecheung, @addaleax PTAL
I'm trying to grok this, so I wrote it down.

Copy link
Member

Choose a reason for hiding this comment

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

s/isolate/Isolate/, and the comma should be removed

I don’t think it matters that it’s an Isolate thing, though. That’s implementation details, and you can just say “JS execution state” or something like that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ack

Copy link
Member

Choose a reason for hiding this comment

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

s/exception semantics/exceptions/?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I went with exception handling and added a reference (GCC state 7% runtime cost which I think is interesting).

Copy link
Member

Choose a reason for hiding this comment

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

s/isolate/Isolate/, and the comma should be removed

I don’t think it matters that it’s an Isolate thing, though. That’s implementation details, and you can just say “JS execution state” or something like that.

@refack refack force-pushed the more-references-in-cpp-guide branch from 41872c5 to 5764fdb Compare October 16, 2018 15:32
@refack
Copy link
Contributor Author

refack commented Oct 16, 2018

@refack refack added the meta Issues and PRs related to the general management of the project. label Oct 16, 2018
PR-URL: nodejs#23650
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@refack refack force-pushed the more-references-in-cpp-guide branch from 5764fdb to cf3f8dd Compare October 16, 2018 21:50
@refack refack merged commit cf3f8dd into nodejs:master Oct 16, 2018
@refack refack deleted the more-references-in-cpp-guide branch October 16, 2018 22:05
jasnell pushed a commit that referenced this pull request Oct 17, 2018
PR-URL: #23650
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
addaleax pushed a commit that referenced this pull request Oct 20, 2018
PR-URL: #23650
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@refack refack removed their assignment Oct 20, 2018
MylesBorins pushed a commit that referenced this pull request Oct 30, 2018
PR-URL: #23650
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@codebytere codebytere mentioned this pull request Nov 27, 2018
rvagg pushed a commit that referenced this pull request Nov 28, 2018
PR-URL: #23650
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 29, 2018
PR-URL: #23650
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@codebytere codebytere mentioned this pull request Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. doc Issues and PRs related to the documentations. meta Issues and PRs related to the general management of the project.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants