RadicalZephyr / sodium-rust

FRP implementation in Rust
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Splitting Streams #13

Open RadicalZephyr opened 8 months ago

RadicalZephyr commented 8 months ago

In nearly every case that I've encountered personally while using Sodium, whenever I have a Result or an Option, or even a boolean filter that I want to apply to a Stream, I almost always want to actually split the Stream based on that criteria.

In order to provide robust error handling and responsiveness, you want to respond to all inputs, even if they're invalid.

This means that instead of the various filter methods returning a single Stream, they should actually return a pair of Stream. My enum dispatching idea is basically addressing the same idea.