[Pas2js] Testing generics

Michael Van Canneyt michael at freepascal.org
Wed Oct 23 10:32:45 CEST 2019



On Tue, 22 Oct 2019, Ben Grasset wrote:

> On Tue, Oct 22, 2019 at 5:21 PM Mattias Gaertner via Pas2js <
> pas2js at lists.freepascal.org> wrote:
>
>> What do you mean with the "forward-declaration problem with generics"?
>>
>
> It's not an issue with Pas2JS. I just meant the way they work in Pascal in
> general with regards to callbacks and such.
>
> On Tue, Oct 22, 2019 at 5:41 PM Michael Van Canneyt <michael at freepascal.org>
> wrote:
>
>> Please send it to me, I'll use it as inspiration for changing the existing
>> classes.
>
>
> Just sent you an email with it, along with a little example applicaton I
> just made.

Great, thank you !

>
> To be clear, it *is* the existing classes, with the proper "class external"
> definitions, but just generic (with a few additions I made here and there.)

I had a quick look, it's just what I had in mind. I can insert it almost
verbatim, and redefine the existing classes as a specialization with JSValue
as a type.

Thank you, this will save me a lot of typing :-)

This weekend I will do the refactoring. 
This, together with the support for linking resources, is reason enough to make 
a new release, even without the fgl and system.generics.* units...

Exciting times :-)

Michael.




More information about the Pas2js mailing list