Recent

Author Topic: Pas2js for Delphi  (Read 5364 times)

Kryvich

  • Newbie
  • Posts: 4
Pas2js for Delphi
« on: January 26, 2019, 03:40:21 pm »
I have made an adaptation of Pas2js for Delphi compiler. So now it's possible to debug the code in Delphi IDE.

If somebody interested you can find it here: https://github.com/Kryuski/pas2js-for-delphi

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Pas2js for Delphi
« Reply #1 on: January 29, 2019, 01:52:59 pm »
Nice. :)
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

Akira1364

  • Hero Member
  • *****
  • Posts: 561
Re: Pas2js for Delphi
« Reply #2 on: January 31, 2019, 02:42:34 am »
Quote
Used generic collections (TDictionary<string, XXX>) instead of TFPHashObjectList.

Certainly something I'd like to see more of on the FPC side of things as far as new libraries/utilities being written, especially considering that for example the FPC Generics.Collections is well known to perform better than any of the other FPC containers libraries.

I don't really understand why anyone would start a new project using non-generic lists/dictionaries/e.t.c. nowadays.

Zoran

  • Hero Member
  • *****
  • Posts: 1829
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Pas2js for Delphi
« Reply #3 on: January 31, 2019, 11:23:26 am »
Quote
Used generic collections (TDictionary<string, XXX>) instead of TFPHashObjectList.

Certainly something I'd like to see more of on the FPC side of things as far as new libraries/utilities being written, especially considering that for example the FPC Generics.Collections is well known to perform better than any of the other FPC containers libraries.

I don't really understand why anyone would start a new project using non-generic lists/dictionaries/e.t.c. nowadays.

Akira1364, Is there a particular reason for introducing TDictionary, when we have TFPGMap from unit fgl, which is part of rtl?


marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Pas2js for Delphi
« Reply #4 on: January 31, 2019, 01:27:28 pm »

Akira1364, Is there a particular reason for introducing TDictionary, when we have TFPGMap from unit fgl, which is part of rtl?

- Afaik TFPGMap are array wrappers, and with larger counts, the resizes get more and more expensive and the fragmentation higher.
- no for .. in support.
- primitive hashing.

IOW there is simply no reason to use them, except that they are Delphi incompatible and minimalistic.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Pas2js for Delphi
« Reply #5 on: February 04, 2019, 09:11:12 am »
Also the types in Generics.Collections support records without any operator overload.

One advantage of the FGL ones: they are small, so they're more suitable for embedded projects where memory size might be an issue.

And for those that are interested: here we have a performance comparison of various FPC containers (no, not by me).

Zoran

  • Hero Member
  • *****
  • Posts: 1829
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Pas2js for Delphi
« Reply #6 on: February 04, 2019, 12:56:33 pm »
I see. Thank you, Sven and Marco.

 

TinyPortal © 2005-2018