A small patch to use the StringConcatFactory instead of String.format() to implement toString() of a data class

John Rose john.r.rose at oracle.com
Tue Nov 14 13:57:31 UTC 2017

On Nov 14, 2017, at 4:40 AM, forax at univ-mlv.fr <mailto:forax at univ-mlv.fr> wrote:
> Speaking of the meta protocol, i wonder if at some point, it's not better to use a condy to encapsulate the data class, the field names and the getters. So the runtime representation that split the names and create the unmodifiable lists can be shared between the 3 invokedynamic calls. 

Yes!  That's a driving motivation for condy, to manage the ad hoc
metadata required by a modern translation strategy.

We came across that use case thinking about enhanced switch,
where each case probably wants to have its own metadata
block which reifies all the pattern-matching logic for the case.
Then the switch as a whole is an indy whose arguments are
those cases.  This is also why we are lifting arity limitations on
BSM argument lists.

— John

More information about the amber-dev mailing list