Conversation
With `fork()` now being a static function, and operations all being atoms that don't have arguments, the signature for `fork()` and `execute()` became exactly the same: ```ts fork(operation) => Execution execute(operation) => Execution ``` It wasn't hard to see that `execute` was nothing more than a "root" fork. Or a just fork that had no existing context, so it made it much more conceptually simple to eliminate one in favor of the other. This removes the `execute` function altogether, and adds a base case to `fork()` where if the current execution is not defined, it creates a brand new execution to serve as the root context.
Member
|
A preview package of this pull request has been released to NPM with the tag $ npm install effection@unify-fork-and-executeor by updating your package.json to: {
"effection": "unify-fork-and-execute"
}Once the branch associated with this tag is deleted (usually once the PR is merged or closed), it will no longer be available. However, it currently references effection@0.2.0-bed72bd which will be available to install forever. |
Merged
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
With
fork()now being a static function, and operations all being atoms that don't have arguments, the signature forfork()andexecute()became exactly the same:It wasn't hard to see that
executewas nothing more than a "root" fork. Or a just fork that had no existing context, so it made it much more conceptually simple to eliminate one in favor of the other.This removes the
executefunction altogether, and adds a base case tofork()where if the current execution is not defined, it creates a brand new execution to serve as the root context.