readline: use logical assignment operators#39174
readline: use logical assignment operators#39174VoltrexKeyva wants to merge 1 commit intonodejs:masterfrom
Conversation
With the addition of the new logical assignment operators (`||=`, `??=` and `&&=`), we could use it here.
|
On a note, if these changes are alright; could we change this PR to make use of the operators in all the lib modules instead of just this one? Or should we make several different PRs for it? |
|
After what we learned in #38245, I think we should be extra cautious when making this kind of change to existing code. The risk of introducing perf regressions for the sake of a small (debatable) improvement in the readability of code seems like a pretty bad deal IMHO, I would be -1 for anything that touches a hot code path (in the case of I don't think we should land this kind of change until:
Keeping the PRs minimal would be the right way to go: it's easier to review, has less risk of getting conflicts with other PRs, and easier to revert. |
Understandable, I don't think its worth it to land a small change like this that probably has a chance of either causing a perf regression or something similar until the rules you mentioned such as them being addressed by V8; closing. |
With the addition of the new logical assignment operators
(
||=,??=and&&=), we could use them here.