wait for ( condition );

Stop executing statements until the condition evaluates to true.  To
implement this, freeze the instance of the function in, add a hook to each
variable in the condition so that when its value is written to, the
condition is re-evaluated.

This will greatly increase the clarity and reduce coding needed for
operations with many asynchronous calls and any with callbacks using arrow
functions..  E.g.,

let a = false;
let b = 5;
let c = 'oranges';
doSomethenWhenever( () => { a = true; }
doAnotherThingWhenever( () => { b = 16; }
DoYetAnotherThing( () => { c = 'apples'; }
wait for ( a && b > 10 && c !== 'oranges' );
console.log('Conditions are met!');


-- 
Matthew C. Tedder
HyperConversal, Inc.
Desk: 352-381-7142 / Cell: 509-432-5520
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to