-
Notifications
You must be signed in to change notification settings - Fork 8
pure fusion in Dynamic
#100
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
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's interesting: Dynamic Apply instance doesn't need this, Dynamic Bind instance does. And
mapAsyncdoes. It seems this should be avoidable so we have even less nodes. Or it isn't?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting observation!
In principle we could specialize bind and mapAsync so that we don't need it. It's just that in these cases I think we don't gain much, and it would require substantial work.
Firsy, in both cases the Pure has no chance of propagating further.
mapAsync on a Pure still has to return a DynNode, to handle the loading state.
And for RHS of a bind case: if the LHS is still dynamic, we can't propagate anyway. And we already handle the case where the LHS is Pure.
So this would be a small local gain. Async is usually so heavy that the specialization wouldn't make sense. For bind I think we can still consider it.
Second, in the current shape rhe change doesn't need to touch the Incremental layer, which buys us a but of "obviously correct"ness.