Talk:Active object: Difference between revisions

no edit summary
(task_1 wants a task_2 but doesn't need one)
 
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 6:
 
After having written them, I like both of these options; but it seems unreasonable to have two slightly different "integrator" tasks. Opinions? --[[User:Kevin Reid|Kevin Reid]] 01:40, 4 November 2008 (UTC)
 
: Time dependency was not meant as one on clock readings. The state of an active object changes asynchronously to the object's observers. Unfortunately in this example it can be traced down to clock readings, but that was unintentional.
 
:* A better example could be an object with the task performing some I/O, like querying a database or making 3D animation. But that would make it too complicated.
:* Alternatively we could use a more complex function of time, in order to make it impossible to evaluate accumulated state change over any considerably larger period of time. Actually all numeric simulations are like that. An easy way could be to make the input ''K'' a subprogram, rather than constant. The integrator will integrate ''K''(''t'')d''t''. Would it be better? --[[User:Dmitry-kazakov|Dmitry-kazakov]] 08:50, 4 November 2008 (UTC)
:: Your second option (subprogram) is the same as my second option, in different terms. Go ahead and change the task; I'll update my example afterward. --[[User:Kevin Reid|Kevin Reid]] 00:35, 5 November 2008 (UTC)
::: OK, I have changed it. --[[User:Dmitry-kazakov|Dmitry-kazakov]] 10:24, 5 November 2008 (UTC)
:::: I have updated my example to match. Note that the input function is not an explicit function of time; I feel this is appropriate both as good E programming style, and because other input functions might use something other than time; e.g. the current value of some variable, or some external input, etc. --[[User:Kevin Reid|Kevin Reid]] 21:20, 5 November 2008 (UTC)