-
Notifications
You must be signed in to change notification settings - Fork 91
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
Overload assignment operator for replacing model components with other functions #298
Comments
Hi,
This makes the redefinition of |
Hi @JamesPHoughton Please, let me know what do you think about these changes. The class now is indirectly tested by the already existing tests, if you think is a good approach, I will add unit tests for each class method. |
I think the components class is fine. Its hard to know what the performance hit would be, but it shouldn't be too bad, right? Do we have a way to test that? One argument for going away from this would be if we end up using a JIT compiler or something similar that can't navigate through the class. I don't know if that's going to happen any time soon, though. I don't see anything wrong with this, if the performance hit is small. |
Hi @JamesPHoughton |
Context: in 2.0, will have a dependencies dictionary that lets you execute/cache model components more intelligently. In order for this to work while still allowing users to assign new functions in place of old model components, we need to overload the assignment operator.
@enekomartinmartinez - this looks like a promising example: https://stackoverflow.com/a/11024909/6361632
The text was updated successfully, but these errors were encountered: