[External] : Re: Exploratory proposal: First-class namespace construct for data-oriented / functional Java

Michał Kłeczek michal at kleczek.org
Wed Feb 25 19:03:53 UTC 2026



> On 25 Feb 2026, at 18:47, Brian Goetz <brian.goetz at oracle.com> wrote:
> 
> 
> If I felt these were a bigger deal, though, there is a _much_ better solution in evidence for these problems and more: something like Scala's `object` declaration.  This achieves the boilerplate goals through solving some real semantic problems: lifecycle management of singletons, plus elevating static behavior to instance behavior.  (This strengthens statics rather than just doubling down on them.)

Or, IMHO a very interesting direction: metaclasses as described in this excellent paper over 20 years ago by Eric Allen et al.: https://dl.acm.org/doi/10.1145/1028976.1029008

Kind regards,

—
Michał
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20260225/41b17752/attachment.htm>


More information about the amber-dev mailing list