Many programming languages have very formal processes for implementing language enhancements (such as the following)
- https://github.com/JuliaLang/Juleps
- https://openjdk.org/jeps/1
- https://peps.python.org/pep-0001/
- https://isocpp.org/std/submit-a-proposal
Coming from a Julia perspective of "just make a PR", these all are incredibly formal (especially for a relatively small language with a tightly knit culture), but especially since Julia as a language has matured fairly significantly over the past few years, we do likely want to increase the amount of process and effort for adding new features to Base (both to improve the quality of features that get added and to discourage adding to Base by default).
It's worth noting that Julia already has a process for this https://github.com/JuliaLang/Juleps, but it is very optional (at time of writing there only appear to be 9 entries), likely due to the added inconvenience of requiring a pull request to a separate repository. I think the idea and use of the Julep process for the changes that have used it has worked well, but I think the organization has meant that we do not use them as frequently as we should.
As such, I think we should likely adopt a process less formal than that of other languages, but more formal than what we have now. As a rough draft of one (stealing lots here from python's PEP1 since it seems pretty good overall).
Each Pull request introducing new functionality should include (either directly or by link to some external document such as a Julep, github issue, or HackMD document):
- Abstract – a brief description of the technical issue being addressed.
- Motivation – It should clearly explain why the existing language specification is inadequate to address the problem that the JEP solves. This can include collecting documented support for the JEP from important projects in the Julia ecosystem.
- Rationale – The rationale fleshes out the specification by describing why particular design decisions were made. It should describe alternate designs that were considered and related work, e.g. how the feature is supported in other languages. The rationale should provide evidence of consensus within the community and discuss important objections or concerns raised during discussion.
- Specification – The technical specification should describe the syntax and semantics of any new language feature.
- Backwards Compatibility – All JEPs that introduce backwards incompatibilities must include a section describing these incompatibilities and their severity. The JEP must explain how the author proposes to deal with these incompatibilities.
- Security Implications – If there are security concerns in relation to the JEP, those concerns should be explicitly written out to make sure reviewers of the JEP are aware of them.
- Reference Implementation – If possible, the code should be implemented in a (possibly unregistered) package. While there is merit to the approach of reaching consensus on the specification and rationale before writing code, the principle of “rough consensus and running code” is still useful when it comes to resolving many discussions of API details. The final implementation must include test code, documentation, and news entries as appropriate.
- Rejected Ideas – Throughout the discussion of a JEP, various ideas will be proposed which are not accepted. Those rejected ideas should be recorded along with the reasoning as to why they were rejected. This both helps record the thought process behind the final version of the JEP as well as preventing people from bringing up the same rejected idea again in subsequent discussions. In a way this section can be thought of as a breakout section of the Rationale section that is focused specifically on why certain ideas were not ultimately pursued.
- Open Issues – While a JEP is in draft, ideas can come up which warrant further discussion. Those ideas should be recorded so people know that they are being thought about but do not have a concrete resolution. This helps make sure all issues required for the JEP to be ready for consideration are complete and reduces people duplicating prior discussion.
This is just a draft, but when finalized, I think it should go into the contributing guidelines and possibly be part of a template for feature PRs
Many programming languages have very formal processes for implementing language enhancements (such as the following)
Coming from a Julia perspective of "just make a PR", these all are incredibly formal (especially for a relatively small language with a tightly knit culture), but especially since Julia as a language has matured fairly significantly over the past few years, we do likely want to increase the amount of process and effort for adding new features to Base (both to improve the quality of features that get added and to discourage adding to Base by default).
It's worth noting that Julia already has a process for this https://github.com/JuliaLang/Juleps, but it is very optional (at time of writing there only appear to be 9 entries), likely due to the added inconvenience of requiring a pull request to a separate repository. I think the idea and use of the Julep process for the changes that have used it has worked well, but I think the organization has meant that we do not use them as frequently as we should.
As such, I think we should likely adopt a process less formal than that of other languages, but more formal than what we have now. As a rough draft of one (stealing lots here from python's PEP1 since it seems pretty good overall).
This is just a draft, but when finalized, I think it should go into the contributing guidelines and possibly be part of a template for feature PRs