<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi, this mailing list is for general governance of the jdk project of OpenJDK instead for specific proposals for specific areas.</div>
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
>From a Java Language-specific perspective, it seems you are implying to make an instance initializer (<a href="https://docs.oracle.com/javase/specs/jls/se24/html/jls-8.html#jls-8.6" title="https://docs.oracle.com/javase/specs/jls/se24/html/jls-8.html#jls-8.6">JLS
 8.6</a>) an error. This seems unrealistic as the Java programming language has not yet removed any language feature.</div>
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
In addition, I don't think this problem is valid: Java programmers know that methods are declared with a return type, a name, and a parameter list. (See JLS 8.4, 9.4) There is no such concept as "a method without a name." I think your better bet is to adopt
 the habit of writing a method declaration before writing a method body and to turn on IDE inspections (if you have an IDE) to make instance initializers a warning.</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> jdk-dev <jdk-dev-retn@openjdk.org> on behalf of DLOzTOR <zafabar1@gmail.com><br>
<b>Sent:</b> Sunday, March 23, 2025 3:10 PM<br>
<b>To:</b> jdk-dev@openjdk.org <jdk-dev@openjdk.org><br>
<b>Subject:</b> Adding an 'init' keyword for initializers in Java</font>
<div> </div>
</div>
<div>
<div dir="ltr">I encountered a problem when I mistakenly wrote a method without a name and it was perceived as an initializer, to avoid such cases I want to suggest adding a keyword for declaring initializers.<br>
Something like this:<br>
<div>class Example {<br>
    init {}<br>
    static init {}<br>
}</div>
</div>
</div>
</body>
</html>