> It is all much better explained here why blocking is better:
> http://www.ararat.cz/synapse/doku.php/about

I would not say that blocking is "better". Programming with synchronous
functions needs less callbacks and thus gives more compact code at the cost
of performance. If this is OK depends on the requirements of your
application.

That said I think that the real question should be: "Why doesn't Delphi
improve support for asynchronous programming?" because there are other
programming languages that allow you to write asynchronous code without
explicit callbacks by supporting coroutines (see
http://en.wikipedia.org/wiki/Coroutine).

"Vala" is my current favourite language in that direction, all you have to do
there is to add a "yield" in front of calling asynchronous functions
and the compiler takes care of the rest (callback, state machine).

Code examples:
http://live.gnome.org/Vala/GIOSamples#Asynchronous_Stream_Reading
http://live.gnome.org/Vala/GIONetworkingSample#line-156

How I wish there would be a "yield" keyword in Delphi...

Regards,
Tobias

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to