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
{{ message }}
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.
Making event streams finite opens a lot of doors for new methods and capabilities on event streams. @nafg you've mentioned to me you like what bacon.js does, so following suit, we could have an Event data type along the lines of
/** base event type */
sealed trait Event[+T]
/** sent when `fire` is called */
case class Next[+T](item: T) extends Event[T] //aka Fire
/** maybe unnecessary for us, but represents an event error */
case class Error(cause: Throwable) extends Event[Nothing]
/** sent when the eventstream is finished, or when `stop` or
some similar method gets called */
case object Done extends Event[Nothing]
/** this is how bacon.js sends the "current" value for their
equivalent of a Signal, when an observer subscribes to it */
case object Initial[+T](item: T) extends Event[T]
Supposing eventstreams used Event[T] under the hood, we could implement things like ++ for stream concatenation, def end: Future[Time], and potentially clean up the Signal API by removing the current method as you had mentioned in conversation previously.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Making event streams finite opens a lot of doors for new methods and capabilities on event streams. @nafg you've mentioned to me you like what
bacon.js
does, so following suit, we could have anEvent
data type along the lines ofSupposing eventstreams used
Event[T]
under the hood, we could implement things like++
for stream concatenation,def end: Future[Time]
, and potentially clean up theSignal
API by removing thecurrent
method as you had mentioned in conversation previously.The text was updated successfully, but these errors were encountered: