-
Notifications
You must be signed in to change notification settings - Fork 5
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
Lifted function semantics #6
Comments
Hmm... I recall mentioning something like this previously (on Gitter?), but perhaps something like making it so that lifted functions would return a stream if any one of the source observables was a stream might lead to a reasonable API (otherwise all sources are either constants (result is a constant) or properties (result is a property)). |
Yeah I believe we were thinking about that kind of solution some months ago. I think we were discussing about the semantics when it would return a stream, but any of the sources being stream sounds reasonable. |
@rikutiira sorry to bump a very old issue but I am facing the same problem with requests not firing the second time, what have you done to work around this? |
I'm still unsure if the lifted function semantics are good as they are now. As @polytypic mentioned in another issue, lifted functions have following functionality:
My issue is mainly with the automatic skipping of identical values. That mostly works fine for properties but it does not work with streams at all. I understand that the Calmm way to do things is to use properties and avoid side-effects but sometimes streams are necessary.
Karet.util
even has abus
function for creating streams which you can push values to. I have ran into weird bugs with streams because I'm using karet.util functions and they skip identical values. The latest issue was with my cancel feature of Form: it's a stream which tells to cancel the current state of form, but only the first cancel worked because the stream is always emitting the same value.I also ran into a weird bug with deep lifting of the arguments but I simply didn't remember that lift was doing that. As long as it's well documented, I feel that's a fine semantic.
But question is: does skipping identical values automatically cause more issues than it solves? At least I'm not personally fan of not being able to use karet.util for streams, even when karet.util has utilities for working with streams.
The text was updated successfully, but these errors were encountered: