We want to have clear goals for the Carbon project, to both establish and document where we expect Carbon to be headed. These are aspirational goals, and we will try our best to achieve all of them. The documented goals should make it easier for potential users to determine whether Carbon is an appropriate fit for them.
Carbon's goals are heavily based on "Goals and priorities for C++". Many thanks to the authors and contributors for helping us formulate our goals and priorities.
This proposal was drafted in Docs.
The proposed goals are encapsulated in the goals changes.
The goals are currently a series of rough goals, with no specific metrics to measure them by. We've discussed adding metrics, and decided not to include them in the goals; the expectation is that they'll be added separately as a principle.
This proposal includes success criteria covering:
It should be expected that more will be added in the future.
Right now, interoperability/migration is priority #7, indicating that when trade-offs are necessary, interoperability is likely to suffer. At least some parties believe it should be somewhere in the top 3 priorities, perhaps #1. Overall, we believe a consensus can be formed around keeping interoperability/migration as #7, so long as there are clear minimum expectations for interoperability.
Part of the priority conflict may be an interpretation that there will only rarely be compromises between goals, irrespective of the priority of interoperability. For example, considering the readability of C++ interoperability syntax, it could be viewed in two ways:
While the proposers prefer the first interpretation, the second all-or-nothing interpretation may be what's leading to the desire of treating interoperability as a higher priority.
Overall, we would present the advantages and disadvantages as:
Advantages:
Disadvantages:
For example of where trade-offs may be seen right now:
Int vs int, Carbon's plans do not mirror C++. This
could be considered a conflict with multiple priorities:
Int, should be allowed to replace
C++-specified overflow behaviors with alternatives that are higher
performance.Int trapping where C++ would overflow should
make code safety easier.A concern was raised that, while the "Governance and evolution" doc calls for all decisions to be justified by goals, there was no clear goal to justify the existence of things like a code of conduct. Similarly, if performance is the highest priority, then one might decide that retaining a performance expert may take priority over addressing their bad behavior.
To address this issue, project goals were added. They are not explicitly part of the numeric priority list. However, while we expect a ranking of language goals in order to weigh tradeoffs in the language design, we see project goals as orthogonal to language design.
The project goals could be addressed as-is in the proposal.
We could completely remove the project goals from this document.
Advantages:
Disadvantages:
We could make the project goals part of the priority list.
Advantages:
Disadvantages:
Originally, we only had one goals and priorities section. We could re-merge project goals and language goals.
Advantages:
Disadvantages:
A concrete set of goals is essential to ensure that contributors to the Carbon project are working in the same direction, and as a guide for what constitutes progress in every aspect of the project. It is important to have a coherent, agreed-upon vision and direction for a programming language, as a social contract between people who work on it and people who use it. The goals listed have been iterated on for many months by many parties.
These goals reflect not only the kind of community and language that the core team would like to build, but also the kind of community and language that a large population of C++ users have been asking for from C++ itself. As a consequence, this particular set of goals seems like an important direction in which to experiment with a candidate future for C++ itself. By doing so, it will address a specific group of C++ users.
While there may be some uncertainty about resolving conflicts between goals, particularly migratability and C++ interoperability, the core team feels that they are generally in alignment in this regard. The priority among goals can be revised as needed based on the experience of using it in practice.
There were no open questions. GitHub issue 106 contains points to be considered and, if necessary, resolved in a subsequent proposal.