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

Allow replacing existing operators #74

Closed
javiercbk opened this issue Oct 18, 2017 · 2 comments
Closed

Allow replacing existing operators #74

javiercbk opened this issue Oct 18, 2017 · 2 comments

Comments

@javiercbk
Copy link

Currently the library does not allow to replace existing operations. I believe that replacing an existing operations is a great way to patch something for my use case, why wouldn't allow it?

For example, I reported #73 and I wanted to quickly patch the operation without forking the library but I cannot due this check:

assert(!has(operators, op), op + ' already exists for \'' + opClass + '\' operators');
@javiercbk javiercbk changed the title Allow replacing operators Allow replacing existing operators Oct 18, 2017
@kofrasa
Copy link
Owner

kofrasa commented Oct 18, 2017

Replacing existing operators is not allowed to avoid unpredictable behaviour. Some operator implementation depend on others internally. If a standard operator is not working as expected, then it should be reported as a bug.

Alternatively you can provide your own custom operator to extend the existing operators for new functionality, or as a stand-in for an existing one until a fix is applied.

@javiercbk
Copy link
Author

javiercbk commented Oct 19, 2017

Ok, thanks. I believe this issue will be reopened if more users of this library want this behaviour.

As a final statement, I think that if you (developer) are replacing an existing operator, you know that you are introducing a something that might break the library.

Thanks.

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

No branches or pull requests

2 participants