// Here's a standard view manager. You can store a View by a name, and then retrieve it later by the same name
class ViewManager
mut fun put(name: Str, view: View) {}
fun get(name): View {}
}
// This trait indicates the ViewManager has a particular view with a given name
trait HasView(name: Str, view: Class<View>) for ViewManager{
put(name, view) -> HasView(name, view.class)
HasView.get(name): view //If we call `get()`, we know the class of the view
}
mut manager = ViewManager() //Needs to be mutable so that we call the mutable functions