[Pas2js] JS Sync/Async Limitations

Michael Van Canneyt michael at freepascal.org
Fri Feb 22 08:37:29 CET 2019



On Fri, 22 Feb 2019, Mattias Gaertner via Pas2js wrote:

> On Thu, 21 Feb 2019 22:36:05 +0100 (CET)
> Michael Van Canneyt <michael at freepascal.org> wrote:
>
>> On Thu, 21 Feb 2019, Michael Schnell wrote:
>> 
>> >> Every call that is asynchronous in the browser can be more or less
>> >> emulated using a thread in a native app, to have the same "async"
>> >> logic. 
>> >
>> > That's frustrating, as IMHO a long time goal (from an application
>> > programmer's POV) should be to do a project and just define which
>> > parts of it should run on the server and which parts should run in
>> > the browser, being able to adapt the used modules to a given
>> > environment. 
>> 
>> I think this is neither realistic nor desirable.
>> 
>> I don't want my database code to run in the browser.
>
> Maybe he means a project group with one webapp project and one server
> project?

That can of course be, but I don't read the statement as such given the
prior communication..
To me it sounds as if he wants to be able to chose for a particular piece of code
where he will run it: the original thought was that the same code should 
be able to run on a browser (async) or natively (threaded).

Michael.



More information about the Pas2js mailing list