[External] : Re: Draft JEP Announcement: "Computed Constants"

David Alayachew davidalayachew at gmail.com
Mon Jul 31 08:30:21 UTC 2023


Hello Per,

Thank you for the response!

I'm afraid I don't follow. Could you demonstrate what you mean?

Thank you for your time and help!
David Alayachew

On Mon, Jul 31, 2023 at 3:05 AM Per-Ake Minborg <per-ake.minborg at oracle.com>
wrote:

> Hi David.
>
> Thanks for the encouragement.
>
> You can actually *reference* CC objects in a circular way as long as you
> do not create circularity in the *evaluation* of CC objects. So, it is, for
> example, perfectly legal to query if a CC is bound via the isBound() method
> in a circular way.
>
> Just to remind you, initialization can only be made at most once per CC
> instance/element.
>
> Best, Per
> ------------------------------
> *From:* David Alayachew <davidalayachew at gmail.com>
> *Sent:* Thursday, July 27, 2023 7:27 PM
> *To:* Per-Ake Minborg <per-ake.minborg at oracle.com>
> *Cc:* leyden-dev at openjdk.org <leyden-dev at openjdk.org>
> *Subject:* [External] : Re: Draft JEP Announcement: "Computed Constants"
>
> Hello Per,
>
> Thank you for posting this JEP!
>
> It looks great. The solution is concise, clear, and simple, and any
> complaints I have about verbosity can be mostly addressed with var. And
> that list suggestion was especially nice. That's very neat.
>
> I'd like to ask about the safety point. I certainly understand the reason
> why it exists -- some developers will inadvertently create a circular
> reference and end up causing problems.
>
> However, I see a lot of utility for circular references too. Any chance
> that we could allow devs to opt-in to circular references?
>
> Earlier this month, I started 2 threads that were broaching the subject of
> a very similar pain point to this one. Here they both are.
>
> https://mail.openjdk.org/pipermail/amber-dev/2023-July/008129.html
>
> https://mail.openjdk.org/pipermail/amber-dev/2023-July/008154.html
>
> I'm curious how this Computed Constant solution would work out for the
> problem I have. But in order for it to work, it would need to enable
> circular references, hence my question.
>
> But even without it, I see a lot of utility for this tool. I'm excited to
> get to work prototyping with it.
>
> Thank you for your time and help!
> David Alayachew
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/leyden-dev/attachments/20230731/d2f7ff98/attachment.htm>


More information about the leyden-dev mailing list