Submitting a JEP

David Lloyd david.lloyd at redhat.com
Fri Oct 6 12:24:42 UTC 2017


On Thu, Oct 5, 2017 at 10:17 PM, Brian Goetz <brian.goetz at oracle.com> wrote:
> The proposal is a bad fit for the assertion facility, since the assertion
> facility is designed to be disabled, and what you want is something that
> can't be disabled.

I believe that in the document, Mr. Trebbien explicitly explained why
the assertion facility is a bad fit, and was specifically not
suggesting it be used, but rather using it as an example and template
for the new feature.

> But here's an alternative:
>
>     throw new UnreachableAssertionException("why");
>
> This doesn't need a language feature.

It does, because you cannot put "throw" statements in places where the
compiler has statically determined that control flow cannot reach,
which is a key part of the justification of the feature described in
the document.

This is a feature that I for one have sorely missed for many years
now, especially in more complex state-oriented code where exit points
cannot be made visually clear.

>  It doesn't even need a special
> exception class:
>
>     throw new AssertionError("Unreachable: blah blah");
>
> Adding language features has a significant cost; we prefer to spend that
> where there are not practical alternatives.
>
>
>
>
> On 10/5/2017 5:27 PM, Daniel Trebbien wrote:
>>
>> Hello,
>>
>> I have an idea for enhancing the Java programming language (
>> https://github.com/dtrebbien/JEP-Unreachable-Assertions ).  It is my
>> understanding that in order to change the Java programming language, a JSR
>> will need to be written, but that a good first step is to submit a JDK
>> Enhancement Proposal to gauge support for the idea.  I read JEP 1: JDK
>> Enhancement-Proposal & Roadmap Process (http://openjdk.java.net/jeps/1 )
>> and followed the instructions:  I wrote a draft JEP using the template (
>> http://openjdk.java.net/jeps/2 ) and emailed my Markdown file to "jep dash
>> submit at openjdk dot java dot net", converted back to a valid email
>> address.
>>
>> That was five days ago and I have not received a response.  It could very
>> well be that people are busy.  I would like to confirm, though, that the
>> emailing procedure is still used now that JEPs are being migrated to the
>> JDK Bug System (http://cr.openjdk.java.net/~mr/jep/jep-2.0-02.html ).
>>
>> Is "jep dash submit at openjdk dot java dot net" actively monitored?
>>
>> Daniel
>
>



-- 
- DML


More information about the discuss mailing list