While we started working on this for MH/VH-related use cases (for instance, FFM's jextract will be a big user of stable values), we also realized that this abstraction is actually quite useful in other cases too.

This is really exciting! Stable values open the door to some really exciting 
language features, especially in functional languages.

For example, something similar is used to implement the tail-recursion modulo 
cons transformation in the OCaml compiler: 
https://ocaml.org/manual/5.3/tail_mod_cons.html#sec:details

This could enable languages hosted on the JVM to make all kinds of 
not-quite-tail-recursive programs stack safe without using explicit stacks to 
store the intermediate values.

Is it possible that the informal rules for record components will be adjusted 
to allow stable fields in addition to final ones?

Thanks,
  David Gregory

Reply via email to