Re: RFR: 8287834: Add SymbolLookup::or method [v3]

2023-05-22 Thread Maurizio Cimadamore
On 17/05/2023 02:33, John Hendrikx wrote: SymbolLookup lookUp = name -> library1.find(name) .or(() -> library2.find(name)) .or(() -> loader.find(name)); What you say is true - e.g. the fact that a lookup returns an optional can be used to chain multiple lookups as you

Re: RFR: 8287834: Add SymbolLookup::or method [v3]

2023-05-16 Thread John Hendrikx
On Tue, 16 May 2023 22:36:51 GMT, Maurizio Cimadamore wrote: >> This patch adds a simpler method for composing symbol lookups. It is common >> for clients to chain multiple symbol lookups together, e.g. to find a symbol >> in multiple libraries. >> >> A new instance method, namely

Re: RFR: 8287834: Add SymbolLookup::or method [v3]

2023-05-16 Thread Maurizio Cimadamore
> This patch adds a simpler method for composing symbol lookups. It is common > for clients to chain multiple symbol lookups together, e.g. to find a symbol > in multiple libraries. > > A new instance method, namely `SymbolLookup::or` is added, which first > searches a symbol in the first