notes from Valhalla meeting 5/24/17
John Rose
john.r.rose at oracle.com
Wed Jun 21 23:53:19 UTC 2017
On Jun 21, 2017, at 4:44 PM, Paul Sandoz <paul.sandoz at oracle.com> wrote:
>
> A BSM called to resolve a constant can choose when pulling it’s static args to catch and swallow linkage exceptions, keep on trucking, and return a value. Should this be allowed?
Suppose you have a pattern-matching switch with 100 cases,
each with 10 method references in it. With a BSCI, you can
resolve the 100 cases individually as control flows through them
(or all up front—either way) and if any of the 1000 methods fails
to link, the error can be held off until the relevant case expression
is actually called upon. This is more Java-like than insisting
that all errors are pushed up to the top of a complex structure
that might contain errors.
Another use case: Use a long series of CP expressions,
(accessed via a BSCI.asList accessor) as fodder for an
interpreter ("token codes") that executes a DSL. Again,
you don't want a linkage error at position 100 to prevent
execution of token 1, because you might never get to 100.
— John
More information about the valhalla-spec-observers
mailing list