carboxyl icon indicating copy to clipboard operation
carboxyl copied to clipboard

Deal with dynamic switching more explicitly

Open milibopp opened this issue 9 years ago • 1 comments

The result of creating new events and signals in Carboxyl depends on when it is done. This is necessary to avoid space-leaks, i.e. memorizing the entire history of these objects. By design of the implementation, Carboxyl cannot memorize this, as it does not rely on a garbage collector to clean it up, but rather only has one memory location, where the current value of a signal is stored.

However, this behaviour could be expressed more explicitly. At the moment the semantics of an expression implicitly depend on when it is executed, which is somewhat undesirable. The API would have to be changed to allow this, so this is something to be considered for version 0.2.

The main offender is snapshot. In the paper on FRPNow (see below) it is argued that this could be alleviated by not returning the stream/signal directly, but rather a signal containing it to make the dependence on evaluation time explicit.

Background infos

milibopp avatar Jun 29 '15 15:06 milibopp

I am starting to think that dynamic switching could also be removed in favour of using simpler idioms in user code. Thoughts?

milibopp avatar Apr 15 '16 09:04 milibopp