You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Buffer has long had a number of undocumented methods like Buffer.prototype.asciiSlice() and Buffer.prototype.utf8Slice()... The question is: should these be documented as part of the public API? Or should public access to them be slowly deprecated and removed?
The text was updated successfully, but these errors were encountered:
-1 I strongly believe we should not remove them. These encoding-prefixed methods (including -Write()), while undocumented, can provide significant speed improvements when you know the encoding ahead of time, allowing you to skip encoding name parsing and various other checks.
If it's any consolation, they could be added to the documentation with the additional recommendation that toString() and write() be used in most/general cases (especially when the encoding is variable) or something to that effect.
I'm fine with documenting them. We just shouldn't leave them public and undocumented
VoltrexKeyva
added
buffer
Issues and PRs related to the buffer subsystem.
doc
Issues and PRs related to the documentations.
and removed
doc
Issues and PRs related to the documentations.
labels
Feb 2, 2023
Xstoudi
added a commit
to Xstoudi/node
that referenced
this issue
May 16, 2023
Buffer has long had a number of undocumented methods like
Buffer.prototype.asciiSlice()
andBuffer.prototype.utf8Slice()
... The question is: should these be documented as part of the public API? Or should public access to them be slowly deprecated and removed?The text was updated successfully, but these errors were encountered: