From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=BAYES_40,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a05:6214:1192:: with SMTP id t18mr873365qvv.49.1603249117586; Tue, 20 Oct 2020 19:58:37 -0700 (PDT) X-Received: by 2002:a05:6214:11ee:: with SMTP id e14mr945387qvu.25.1603249117333; Tue, 20 Oct 2020 19:58:37 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 20 Oct 2020 19:58:36 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=99.10.228.144; posting-account=AgomvAoAAAAj6rtZlNDUf1S1XVXbXDpg NNTP-Posting-Host: 99.10.228.144 References: <9d822023-b604-46b1-9443-4471e095704bn@googlegroups.com> <6f14427c-15a6-4874-a3f5-7bc308b2d3bfn@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1f745514-0d25-439f-8872-59030515406en@googlegroups.com> Subject: Re: GDNative thick binding design From: Michael Hardeman Injection-Date: Wed, 21 Oct 2020 02:58:37 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:60459 List-Id: On Friday, October 16, 2020 at 2:32:30 PM UTC-4, Luke A. Guest wrote: > On 16/10/2020 19:28, Michael Hardeman wrote:=20 >=20 > > But I need some way of knowing here: https://github.com/MichaelAllenHar= deman/gdnative_ada/blob/feature/adventure_game/examples/adventure_game/src/= engine_hooks.adb#L28 > That's what the generic constructor wouild allow. > > what all the types that extend that object tagged type are, and what al= l the null methods they've chosen to override are. Kind of like the Java Cl= ass() style introspection.=20 > >=20 > > I'm sure there must be some way of doing it better tho, with generics? = I'm just not creative enough to see the solution atm.=20 > > > You can't know what the null methods are. Why do you even need to know?= =20 >=20 >=20 > I'm probably not understanding this, tbf. Can you explain the Generic Constructor some more? I need to use it now, bu= t I can't exactly figure it out. I found this example: https://www.adacore.= com/gems/ada-gem-19 but I have no idea how they can use the 'Input attribut= e as the constructor function. It doesn't match the signature requested by = the generic at all. I have a simple example I was trying to get working: https://ideone.com/f5b= pr9 Do you think you could help me understand where I'm going wrong here?