RE : RE : Sync IO APIs in Shared Workers

>> 1) Sync APIs are inherently easier to use than async ones, and they are much
>> less error prone. JS developers are not C++ developers. Whenever possible, it's
>> just better to make things more simpler and convenient.
>
>This argument is not particularly helpful. Apart from that, many JS APIs
>use callbacks,
>all developers are-or-have to be aware of them.

Yes, JS web developers are well used to that.
Yet, sync APIs are simpler and much less error prone.
If something easy can be done easily, do it the easy way.

>> 3) It does no harm.
>
>It's not particularly fun re-writing async methods from the webpage to
>be sync for workers, or otherwise using shims to avoid redundancy. The
>extra semantic load on the namespaces (docs and otherwise) isn't all
>that pleasing either. There is a cost.

You may well use the "usual" async version of the API in a worker.
In which case, there is no need for re-writes.





Ke-Fong Lin
Développeur Senior

4D SAS
60, rue d'Alsace
92110 Clichy
France

Standard :
Email :    Ke-Fong.Lin@4d.com
Web :      www.4D.com

Received on Thursday, 5 December 2013 10:25:38 UTC