[fpc-pascal] Generic constants with generic type

2021-04-20 Thread Andrey Zubarev via fpc-pascal
Hi all! With the existing syntax of constants, it is good to pass array boundaries, but bad to initial parameter values. What do you think about such constructs: GTValue=... ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepa

Re: [fpc-pascal] Mustache templates implementation

2021-04-20 Thread Michael Van Canneyt via fpc-pascal
On Tue, 20 Apr 2021, leledumbo via fpc-pascal wrote: Since dmustache (part of mORMot) fails the official mustache tests and did not work on the platform I needed it for, I wrote my own implementation. I do remember it didn't pass all the tests, but still works for my needs so I let it be.

Re: [fpc-pascal] How does TFPGMap key compare work?

2021-04-20 Thread Sven Barth via fpc-pascal
Am 21.04.2021 um 00:09 schrieb Ryan Joseph via fpc-pascal: On Apr 20, 2021, at 3:10 PM, Sven Barth wrote: If you look at TFPSMap' code you'll see that BinaryCompareKey and BinaryCompareData are only used in the way of method pointers OnKeyPtrCompare and OnDataPtrCompare. In TFPGMap<,> these

Re: [fpc-pascal] Mustache templates implementation

2021-04-20 Thread leledumbo via fpc-pascal
> Since dmustache (part of mORMot) fails the official mustache tests and did not work > on the platform I needed it for, I wrote my own implementation. I do remember it didn't pass all the tests, but still works for my needs so I let it be. > The result has been committed to packages/fcl-mustache

Re: [fpc-pascal] How does TFPGMap key compare work?

2021-04-20 Thread Ryan Joseph via fpc-pascal
> On Apr 20, 2021, at 3:10 PM, Sven Barth wrote: > > If you look at TFPSMap' code you'll see that BinaryCompareKey and > BinaryCompareData are only used in the way of method pointers OnKeyPtrCompare > and OnDataPtrCompare. In TFPGMap<,> these are then set to compare methods > specific to the

Re: [fpc-pascal] How does TFPGMap key compare work?

2021-04-20 Thread Sven Barth via fpc-pascal
Am 19.04.2021 um 19:05 schrieb Ryan Joseph via fpc-pascal: I have a question I was just curious about. From what I can tell TFPGMap uses CompareByte to compare keys of arbitrary type, which is clever but how does this work for ShortStrings? I have tried to use this method myself and I find it

[fpc-pascal] Mustache templates implementation

2021-04-20 Thread Michael Van Canneyt via fpc-pascal
Hello , For my job I needed a Mustache templates library in pascal. Since dmustache (part of mORMot) fails the official mustache tests and did not work on the platform I needed it for, I wrote my own implementation. The result has been committed to packages/fcl-mustache, in case someone else