De Icaza: Callbacks as our Generations' Go To Statement
Posted Aug 18, 2013 14:15 UTC (Sun) by magnus
In reply to: De Icaza: Callbacks as our Generations' Go To Statement
Parent article: De Icaza: Callbacks as our Generations' Go To Statement
"interwined long time blocking calls with user actions" is about the worst imaginable way to program. Any programmer attempting to do this will fill their code with hidden race conditions.
One could argue that such a race condition becomes more apparent with a coroutine-ish coding style and that it was more hidden before. In a callback model we could have the exact same race where the program is written so it only works when the callback for a blocking action (getTemperature) is called before the callback from the user action that caused it (button click for example) is called a second time but this is never seen clearly since the functionality is spread out over multiple functions.
to post comments)