If H2O Wave does for Python what Shiny did for R then a logical question if reactive programming is supported by Wave? Reviewing docs I found Data Binding (it appears one-way) and Realtime Sync (which is very cool), but no explicit reference or indication for reactive programming or two way binding (unfortunately docs appear to lack search function yet).
1 Answers
Author here. We're thinking about it (https://github.com/h2oai/wave/issues/170).
Reactive programming (and FRP in general) improve ergonomics in languages with better support for closures / anonymous functions (like R). Python's lambda
is limited to one expression, so "reacting" to events (or even map
functions for two-way binding transforms) results in call sites appearing noisy and/or verbose because defining named functions is unavoidable.
Therefore, we have decided against being prescriptive about event-handling and state management for now, and instead focused on shipping a good foundation that we can build on in the future. In any case, the Python driver is quite thin, and it shouldn't be too difficult to build your own reactive primitives for state management (and even routing) in userland.
Secondly, getting a reactive programming paradigm to function correctly in distributed multiple-worker scenarios is tricky without sticky sessions (for instance, two Python processes on two different machines might need a consistent view of the UI state). We need some additional work on the backend and ship multi-worker first.
In summary: it's not ruled out, we'll get there eventually.

- 460
- 4
- 12