oetzi/echo — Issue #80: Restructure framework around EchoApp
Author: oetzi
Created: 2012-03-09 21:46:46+00:00
State: open
Labels: behaviours, display/io, echo, events

The whole framework should be structured around the EchoApp class. To create an echo application a programming will have to extend EchoApp and then implement the `setup` method with all their FRP code like this:

object MyApp extends EchoApp {
def setup(args : Array[String]) {
val beh = Behaviour(time => time)
println(beh)
}
}

This would create an application that would simply print out the start time of running it. The setup method will be run inside a `freezeTime` block and Event processing will not happen (no occurring during setup).

All FRP types and constructs will be restricted so they can only be created during this setup phase. This will mean that problematic semantics such as `snapshot` can be implemented as their problems with processing past Events is nullified (there are no past events). This should hopefully provide a powerful declarative way to create FRP programs without compromising its power.