This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #3242 Actually deprecate 'binary' buffer encoding
- Loading branch information
Showing
3 changed files
with
30 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5979f09
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As much as I am for using Buffers, the nice thing about the 'binary' strings is that you have all of the useful (built-in) string methods available, such as indexOf, split, match, etc. Is it possible to see some of these methods implemented for Buffer in core or no?
5979f09
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree above.
I hope have a "Powerful Buffer" like String.
5979f09
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel compelled to add that you may compare binary strings with operators (
<
and>
,>=
and<=
), and withBuffer
instances you don't even have methods for that.As well as methods for
concat
(strings also have an operator for that:+
),indexOf
,lastIndexOf
,match
(with regular expressions),replace
(with regular expressions),search
(with regular expressions),split
(with regular expressions).5979f09
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am opening #3246 to express these counter-arguments.