Hi Cannon,

> On Sep 14, 2016, at 4:35 PM, Cannon Smith <[email protected]> 
> wrote:
> 
> I wondered about that. I would have thought that would be pretty rare if the 
> code was structured right, but it sounds like you ran into it quite often?

Yes, I ran into it all the time and it has nothing to do with problem code 
structure. It has to do with two rules that are common in Mac environments that 
support multi-processing. 

1. All user interface and interaction must occur on the main thread.

2. No I/O or long execution can occur on the main thread -- otherwise the 
interface is locked up.

So everything ends up being done with callbacks. 

It is not just the Mac, consider any modern Javascript environment. If you make 
a I/O request, you can't just wait for the result and write an if/then 
statement to handle it. Everything is done by passing callbacks and closures 
around. In my opinion, it is more difficult to read, write, and maintain.


John DeSoi, Ph.D.

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to