Suggestion: A wiki page for all answered "Why don't you ...?"

Brian Goetz brian.goetz at oracle.com
Thu Dec 12 19:53:10 UTC 2024


One thing to be clear on about this effort is: this is not about 
lobbying for the priority of "my favorite feature"; this is merely about 
capturing explanations that have been previously shared, so others can 
find them more easily.

One aspect of moral hazard here is that it is a natural tendency to 
browse this archive and then barge into the list with "But I don't agree 
with your arguments on feature #7."  But the goal here is to reduce 
redundant "why don't you" requests, not increase it. Framing the purpose 
of this artifact clearly can help manage this.


On 12/12/2024 1:34 PM, Archie Cobbs wrote:
> On Thu, Dec 12, 2024 at 10:07 AM Brian Goetz <brian.goetz at oracle.com> 
> wrote:
>
>     There is the amber-docs repo which gets published to
>     `openjdk.org/projects/amber` <http://openjdk.org/projects/amber>,
>     which is probably a better place to put it, and people can
>     contribute via PRs.
>
>
> I think putting something online under amber-docs is a great idea - 
> especially the part where people can contribute using PR's, which 
> fosters decentralized collaboration on the maintenance of the list.
>
> While it would be ideal to have a complete directory of ideas with 
> accompanying summaries of all that has been discussed, we should 
> probably start with something simpler and more maintainable.
>
> Here's a proposal: Have a list of "previously discussed ideas". Each 
> idea has a one line description, a one paragraph summary, an optional 
> example, and a bullet-point list of one or more links to the thread(s) 
> in the archive that contain all the gory details of the discussion.
>
> Here's a simple example...
>
> *Idea:* Using switch statements for if/else control flow
>
> *Description:* Support "switches on nothing" where the cases simply 
> provide the conditions on which to execute various code branches.
>
> *Example:*
>
>     public double toInches(String value) {
>         switch {
>         case when value.endsWith("mm") -> return 0.0393701 * 
> Integer.parseInt(value.substring(0, value.length() - 2));
>         case when value.endsWith("ft") -> return 12 * 
> Integer.parseInt(value.substring(0, value.length() - 2));
>         case when value.endsWith("light-years") -> return 3.725e+17 * 
> Integer.parseInt(value.substring(0, value.length() - 2));
>         default -> throw new IllegalArgumentException("can't parse 
> value");
>         }
>     }
>
> *Discussion:*
>
>   * https://mail.openjdk.org/pipermail/amber-dev/2024-October/008939.html
>
>
> Just now seeing Eirik's reference to Project Jigsaw's Issue Summary 
> document. I like this even better but someone would have to step up 
> and take ownership.
>
> -Archie
>
> -- 
> Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20241212/ee3961f4/attachment.htm>


More information about the amber-dev mailing list