On Tue, Oct 16, 2012 at 3:31 PM, David-Sarah Hopwood
<
davidsara...@googlemail.com> wrote:
> Doable using a typestate system, but it does complicate the type system
> significantly.
thanks for the note, i'll see if i can learn about that.
being a low-powered programmer, i was thinking of just a brute force
approach where (now, you can't completely prevent people from screwing
themselves, so there are holes in this, of course) ui code doesn't get
to keep references to things, so methods are always passed in
("injected", ugh) whatever they need, possibly a directory from which
to get references. those directories would be typed depending on the
particular lifecycle phase the method can be called in. so you can't
get anything with layout calls before the layout phase is
started/done.
something as lame as objective-c could even do things this way i think
off the top of my head.
of course, most programmers looking at such an approach would barf and
riot if told to use it because of the overhead involved.