Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add consumer converter for regular expressions #167

Open
pineapplemachine opened this issue Nov 20, 2017 · 0 comments
Open

Add consumer converter for regular expressions #167

pineapplemachine opened this issue Nov 20, 2017 · 0 comments
Labels
effort: very high The issue will probably take a single contributor more than a week of work to resolve. priority: medium The issue makes it more difficult for people to use the software. type: feature The issue involves adding new or extended behavior to the software. type: polish The issue involves making existing functionality more usable.

Comments

@pineapplemachine
Copy link
Owner

pineapplemachine commented Nov 20, 2017

In short, this should work:

hi("some string").split(/\s+/)

Anywhere that accepts a consumer should also accept and automatically convert a regular expression object.

As of writing there are converters for predicates and sequence inputs, but none for regex objects. It should be possible (if a bit tricky) to write a consumer type whose behavior is determined by a regular expression

Supporting regex lookaround should not be part of this issue. After this issue is resolved, then whether or not to support this feature should be re-evaluated. At present, it looks as though adding support for lookaround would require a substantial increase in complexity for consumers and any code that uses them.

@pineapplemachine pineapplemachine added effort: very high The issue will probably take a single contributor more than a week of work to resolve. priority: medium The issue makes it more difficult for people to use the software. type: feature The issue involves adding new or extended behavior to the software. type: polish The issue involves making existing functionality more usable. labels Nov 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: very high The issue will probably take a single contributor more than a week of work to resolve. priority: medium The issue makes it more difficult for people to use the software. type: feature The issue involves adding new or extended behavior to the software. type: polish The issue involves making existing functionality more usable.
Projects
None yet
Development

No branches or pull requests

1 participant