doc: cleanup and add references to CPP_STYLE_GUIDE.md#23650
doc: cleanup and add references to CPP_STYLE_GUIDE.md#23650refack merged 1 commit intonodejs:masterfrom
Conversation
CPP_STYLE_GUIDE.md
Outdated
CPP_STYLE_GUIDE.md
Outdated
CPP_STYLE_GUIDE.md
Outdated
There was a problem hiding this comment.
This referred specifically to throwing exceptions, though.
(s/error/exception/ would be a good change here, that’s on me.)
There was a problem hiding this comment.
Can you clear this up for me? we can't c++ throw, we need to isolate()->ThrowException() right?
CPP_STYLE_GUIDE.md
Outdated
There was a problem hiding this comment.
typo: it is (twice)
(and maybe s/essential/necessary/)
CPP_STYLE_GUIDE.md
Outdated
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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`.There was a problem hiding this comment.
Actually we should be able to lint for that. I'll see if I can figure out how to.
CPP_STYLE_GUIDE.md
Outdated
There was a problem hiding this comment.
nit: blank lines around code block
CPP_STYLE_GUIDE.md
Outdated
There was a problem hiding this comment.
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]?
CPP_STYLE_GUIDE.md
Outdated
There was a problem hiding this comment.
Currently, this and next lines are rendered as one line.
CPP_STYLE_GUIDE.md
Outdated
There was a problem hiding this comment.
If you want a list of things, you can juse start lines with * instead of manually inserting line breaks
CPP_STYLE_GUIDE.md
Outdated
There was a problem hiding this comment.
No need for a line break, this makes sense as one paragraph.
CPP_STYLE_GUIDE.md
Outdated
CPP_STYLE_GUIDE.md
Outdated
There was a problem hiding this comment.
This somehow reads a bit ambiguous to me now that it's exception, can you change it to JavaScript exception?
CPP_STYLE_GUIDE.md
Outdated
There was a problem hiding this comment.
Do we need to explain this here? Can we link to some docs somewhere?
CPP_STYLE_GUIDE.md
Outdated
There was a problem hiding this comment.
@joyeecheung, @addaleax PTAL
I'm trying to grok this, so I wrote it down.
There was a problem hiding this comment.
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.
CPP_STYLE_GUIDE.md
Outdated
There was a problem hiding this comment.
s/exception semantics/exceptions/?
There was a problem hiding this comment.
I went with exception handling and added a reference (GCC state 7% runtime cost which I think is interesting).
CPP_STYLE_GUIDE.md
Outdated
There was a problem hiding this comment.
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.
41872c5 to
5764fdb
Compare
PR-URL: nodejs#23650 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
5764fdb to
cf3f8dd
Compare
PR-URL: #23650 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: #23650 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: #23650 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: #23650 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: #23650 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>


Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes