Conversation
|
I'm off until next week and probably won't be able to add a meaningful comment until then. |
|
No worries, I'll wait for your opinion! |
devmotion
left a comment
There was a problem hiding this comment.
At first glance, my impression is that there's more work to be done for full StaticArrays support than just fixing the incorrect use of DiffResults (see e.g. #154).
I'm not a fan of major changes to tests in PRs with such significant changes either, so I suggest splitting the PR into multiple smaller PRs, e.g., one that adds and/or modifies tests (without changing the package) and one that fixes the DiffResults API usage.
Given that static arrays have additional problems, I would also suggest just testing ImmutableDiffResult and MutableDiffResult with Arrays (and not SArrays or MArrays) initially (I assume that this will also cause problems currently if the DiffResults API is used incorrectly).
To increase readability, I think we might also want to use the bangbang notation (!!) for internal functions that are changed to be only sometimes mutable (I'd refrain from changing the user-facing API right now).
Fix #251 partially.
result = operator!(result, f, x)instead ofoperator!(result, f, x)whenever possible (see Dependents who forget to re-alias results DiffResults.jl#27)@devmotion do you know the package well enough to help me figure out what I missed?