<div dir="ltr"><div>If I understand correctly, records are immutable.  Annotation values require immutable values.  Can we allow records for annotation values?  What would be the problems with this?<br></div><div><br></div><div>For example, I would love for Duration to be made into a record and then Duration can be put into an annotation.</div><div><br></div><div><a class="gmail_plusreply" id="m_4540501444864510278plusReplyChip-0">@Retry</a>(maxAttempts = 3, delay = Duration.ofSeconds(10))</div><div><br></div><div>... as opposed to what is required today ...<br></div><div><br></div><div>
<a class="gmail_plusreply" id="gmail-m_4540501444864510278plusReplyChip-0">@Retry</a>(maxAttempts = 3, delay = 10, durationUnit = ChronoUnit.SECONDS)  // This is error prone because the value and units are separated and the reader may make a mistake<br></div><div><br></div><div>If Duration, Instant, etc. hasn't been made into a record, I realize that this might need to wait so that the classes evolve slowly.  Let's ignore that possible constraint for this discussion.</div><div><br></div></div>