[Pas2js] JS Sync/Async Limitations

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Feb 21 14:32:22 CET 2019


On Thu, 21 Feb 2019 12:24:49 +0300
Sergei Vertiev <vertiev at gmail.com> wrote:

>[...]
> Spending some time and doing some afforts, i managed to compile alot
> of files to JS. That was really inspiring moment.
> (BTW, JS code is really perfect and easy to understand and debug).

Thanks!
It was Michael's idea to keep the Pascal structure intact, to make
debugging of even big webapps easy.

 
>[...]
> And there are no ways to avoid async operations.
> Http Get/Post works asynchroniusly, alot of JS APIs have
> only Async methods (e.g. IndexedDB)...
> 
> This is most significant difference between Delphi and JS
> behavior and unfortunatelly my "experimental" project which
> starts so happyly - stuck at this point.
> 
> Sure, cool JS programmers know about this specific very well.
> But, i was unaware of this, and i think that many Pascal/Delphi
> programmers don't know about this JS specific neither.
> 
> So, simply decide to share this knowladge with you.

Thanks for sharing. I hope you find a solution.

I started a page for Delphians porting code to
pas2js. Feel free to improve it:
http://wiki.freepascal.org/Porting_from_FPC/Delphi_to_pas2js

Mattias


More information about the Pas2js mailing list