Re: RFR: 8314592: Add shortcut to SymbolLookup::find [v4]

2024-04-16 Thread Jorn Vernee
On Mon, 15 Apr 2024 14:02:56 GMT, Per Minborg wrote: >> While `SymbolLookup` correctly uses an `Optional` return to denote whether a >> symbol has been found by the lookup or not (which enables composition of >> symbol lookups), many clients end up just calling `Optional::get`, or >> `Optional

Re: RFR: 8314592: Add shortcut to SymbolLookup::find [v4]

2024-04-15 Thread Jorn Vernee
On Mon, 15 Apr 2024 14:02:56 GMT, Per Minborg wrote: >> While `SymbolLookup` correctly uses an `Optional` return to denote whether a >> symbol has been found by the lookup or not (which enables composition of >> symbol lookups), many clients end up just calling `Optional::get`, or >> `Optional

Re: RFR: 8314592: Add shortcut to SymbolLookup::find [v4]

2024-04-15 Thread Maurizio Cimadamore
On Mon, 15 Apr 2024 14:02:56 GMT, Per Minborg wrote: >> While `SymbolLookup` correctly uses an `Optional` return to denote whether a >> symbol has been found by the lookup or not (which enables composition of >> symbol lookups), many clients end up just calling `Optional::get`, or >> `Optional

Re: RFR: 8314592: Add shortcut to SymbolLookup::find [v4]

2024-04-15 Thread Per Minborg
> While `SymbolLookup` correctly uses an `Optional` return to denote whether a > symbol has been found by the lookup or not (which enables composition of > symbol lookups), many clients end up just calling `Optional::get`, or > `Optional::orElseThrow()` on the result. > > This PR proposes to ad