Re: [BLACKBOX] [Fwd: Re: [BLACKBOX] Long running command and Dialog.ShowStatus]

From: [at]} <Bob>
Date: Thu, 3 Dec 2009 23:24:52 -0000

----boundary-LibPST-iamunique-177438753_-_-
Content-type: text/plain

[...]
>
> 2) But the logic involved in using Actions can be very
> awkward. If the task is a simple loop, as in this example, it
> is not too bad. But if the task is several nested loops, and
> you need to be able to interrupt it partly through the inner
> loop, it is less easy (but possible, and sometimes necessary).
>
> Surely these problems (apparent hanging of BlackBox, and the
> fact that Ctrl-Break does not work as advertised) can and
> should be solved at a lower level than imposing lots of
> awkward logic into every application?

It's always possible to rewrite a program which has inner loops into the
equivalent program with a single loop, without resorting to awkward logic.

Structured programming encouraged us to design our algorithms to match our
data structures, and this close match leads naturally to nested loops.
However, any design based on say EBNF can be transformed straightforwardly
into the equivalent design using statecharts. Statecharts (and more
particularly state tables) lead quite naturally to a structure containing
only one loop, with the state variable & current input event determining
what happens next.

Although I haven't used Actions for anything serious, I think the approach
to designing a bit of software for it is to treat it as an event-driven
design based on statecharts. This would also work with the original ETH
Oberon keyboard / mouse / network loop and seems appropriate for a
single-user system without the overhead of threads or the need for
statements which let the program breathe, and suchlike.

Bob


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-177438753_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt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