OS/X OpenGL

Michael Hall mik3hall at gmail.com
Wed May 10 14:26:23 UTC 2023



> On May 10, 2023, at 8:52 AM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
> 
> 
> On 10/05/2023 14:05, Michael Hall wrote:
>> Basically you’re saying you need a length 5 chain that needs to be searched for the leaf? Yes, ultimately you would at some point. Possibly you would be over working a lambda? I thought it might be more a convenience to the developer if they have a collection of Path’s they could specify them in one invocation of libraryLookup and the api would manage the necessary multiple SymbolLookup’s searching for the leaf. The developer can of course manage this themselves although again at some point maybe not with a lambda.
>> 
> What I'm saying is this:
> 
> ```
> SymbolLookup MY_LOOKUP = SymbolLookup.compose(
>     libraryLookup("lib1", arena),
>     libraryLookup("lib2", arena),
>     libraryLookup("lib3", arena),
>     libraryLookup("lib4", arena),
>     ...
>     libraryLookup("libN", arena));
> ```
> 
> Doesn't seem bad. You get back a single lookup, which is then used to perform several lookups. If we can achieve same behavior via simple composition, that seems better/more flexible to me. Symbol lookups are created once (at the start of your application) and then "forgot", so I don't think there's a lot of value in making the above more succinct (at the expense of API regularity).
> 
> Maurizio
> 
> 
Ah, sorry, hadn’t seen compose yet. No, not bad at all.

Thanks,
Mike



More information about the panama-dev mailing list