Initial discussion of solutions for issues presented in amber-dev/2022-May/007322

Kasper Nielsen kasperni at gmail.com
Thu May 19 07:22:38 UTC 2022


On Thu, 19 May 2022 at 05:33, Julian Waters <tanksherman27 at gmail.com> wrote:

> Hi all,
>
> Previously a list of issues were laid out in a previous posting to help
> visualize the problem and (try to help) guide future attempts at tackling
> it. I'd thought I'd just throw a few wild ideas out here at the moment to
> keep things going for now in the background as work on Amber continues.
>
> As mentioned, a significant amount of Java boilerplate stems from code that
> is written procedurally- Functionally if you will. These usually take the
> form of final classes with constructors that throw exceptions, which only
> contain static methods.


I don't think I've ever come across a codebase where the problem you are
describing has resulted in any significant boilerplate. Yes, writing private
throwing constructors is annoying. But that's about it, a minor annoyance at
most.

If this really is such a big issue. I think you can solve this a lot easier
than
by adding a new type of class. For example, by allowing interfaces to be
declared final. In which case they can neither be implemented nor
instantiated.
And as a result, the only types of members that would be allowed on a final
interface would be static fields and methods.

/Kasper


More information about the amber-dev mailing list