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 Transform.Option helper method #59

Merged
merged 1 commit into from
Dec 14, 2017
Merged

Add Transform.Option helper method #59

merged 1 commit into from
Dec 14, 2017

Conversation

dsnet
Copy link
Collaborator

@dsnet dsnet commented Dec 13, 2017

Currently there is no easy way to create non-reentrant transformers
where they do not recursively apply on their own output.
You could check for the Transformer name, but the API does not
require the names to be unique.

The only way to write a helper to do this is to generate some obscure
name that is guaranteed to probabilistic never have a conflict.

A better approach is to simply return the original Option
as returned by the Transformer constructor.
Thus, users can rely on == to check if a Transform step exactly
matches a Transformer that they created.

It would be useful to add a non-reentrant transformer to cmpopts,
but that can be a future addition. It will also need a better name.

@dsnet dsnet requested a review from neild December 13, 2017 06:51
Currently there is no easy way to create non-reentrant transformers
where they do not recursively apply on their own output.
You could check for the Transformer name, but the API does not
require the names to be unique.

The only way to write a helper to do this is to generate some obscure
name that is guaranteed to probabilistic never have a conflict.

A better approach is to simply return the original Option
as returned by the Transformer constructor.
Thus, users can rely on == to check if a Transform step exactly
matches a Transformer that they created.

It would be useful to a non-reentrant transformer to cmpopts,
but that can be a future addition. It will also need a better name.
@dsnet dsnet merged commit 2809dbc into master Dec 14, 2017
@dsnet dsnet deleted the transform-option branch December 14, 2017 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants