You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the things happening in v4 is that we're aligning call() to be more similar to Function.prototype.call() This would imply that the signature for call() would be:
call(fn,thisObj, ...args)
The question is 1) is this desirable? and 2) what should we do with the other "call-like" functions in Effection: run() and spawn(). We could align them like this;
On the one hand, this has a nice alignment with vanilla js, but on the other, it's annoying in that we don't really ever use this. Still, this is supposed to feel like native JS building blocks, so I'm not sure what the best way to go is.
On the other hand, I've been toying with the idea of deprecating scope.run() and replacing it by passing scope as a parameter to run() This would re-enforce the idea that this is an entry point from javascript and something you should do with care.
run(fn,{ scope })
Which is better?
The text was updated successfully, but these errors were encountered:
One of the things happening in
v4
is that we're aligningcall()
to be more similar toFunction.prototype.call()
This would imply that the signature forcall()
would be:The question is 1) is this desirable? and 2) what should we do with the other "call-like" functions in Effection:
run()
andspawn()
. We could align them like this;On the one hand, this has a nice alignment with vanilla js, but on the other, it's annoying in that we don't really ever use
this
. Still, this is supposed to feel like native JS building blocks, so I'm not sure what the best way to go is.On the other hand, I've been toying with the idea of deprecating
scope.run()
and replacing it by passing scope as a parameter torun()
This would re-enforce the idea that this is an entry point from javascript and something you should do with care.Which is better?
The text was updated successfully, but these errors were encountered: