On 28 September 2010 00:27, Daniel Trueman
i just wish you could do until an Event... of course, there are other ways...
There is of course the option to extend Event, to also hold a truth value. What this won't do is set the value as .send() or .broadcast() is called, but we can make our own .transmit() that would set the value as well as call .send() or .broadcast(). I find Event nearly always needs to be extended or encapsulated, but that's fine; it's about as versatile as Envelope and about as useful on it's own. To return for a moment to truth values as well; time and duration type variables or constants will evaluate to "true" when they are non-zero. This means that "if(now)" is a useful way of checking whether the VM is currently starting. However; && and || aren't overloaded to deal with this kind of stuff, only the "top level" evaluations like "if", "while" and "until" are. I still hold that to be a inconsistency that needs some care. Nothing new here but I thought I'd go over the useful tricks and trivia, Kas.