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
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:
they give properties that skip identical values
they perform deep lifting of their arguments
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 a bus 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:
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: