Experimentation with build time and runtime class initialization in qbicc
Brian Goetz
brian.goetz at oracle.com
Fri May 27 20:44:55 UTC 2022
> If that field had been a primitive, such as a long, we'd be unable to
> track down which other longs in the heap were copies of it or derived
> from it. We wouldn't reset some other location with the value 42
> because a @RuntimeInitialized field was set to 42 at build time. The
> programmer has to take responsibility for which fields need to be
> reset. With qbicc, that's annotations. With Leyden we may be able to
> give them a better way to group fields and express how & when they
> should be initialized.
I know Dan knows this, but for the broader audience, let me remind
everyone that annotations are not likely to be a suitable mechanism for
anything other than prototyping here. If something affects language
semantics (and all of this does), it needs to be part of the language.
But they're a fine tool for prototypes and proofs-of-concept.
More information about the leyden-dev
mailing list