We need some vaguely consistent shared understanding of the language design as a whole. The goal is merely consistency in discussions, in-progress syntax, and general approach. It in no way needs reliably to reflect the end state, either desired or realized. Instead, it should evolve as each area matures and becomes concrete, while providing an overarching overview that connects the language together, and the consistent background that we all can refer back to during discussions.
This is intended to offer a reasonable starting point for:
This proposal is not intended to achieve:
Many of the ideas here stem from discussions between several of the initial people working on Carbon over several years. That doesn't make them good, but may give some context on where they came from. They are also heavily informed by the experience several of us have both working on the Clang C++ frontend and several C++ codebases including those of LLVM and Clang themselves.
See the language design overview document.
We also considered putting the full design overview in one file, as in PR 22. This is versus the hierarchy proposed here.
Advantages:
Disadvantages:
The primary alternative is to avoid even having a draft or in-progress design of this form until each constituent component is more thoroughly conceived and considered.
Advantages:
Disadvantages:
The compromise chosen is to have the in-progress design and simply work to resist both anchoring and distraction stemming from it. We want to get the benefits we can here while minimizing the cost.
The overview will result in content duplication from individual designs. At the time of this proposal, this may be significant because individual designs are not fleshed out, and should thus duplication should be expected to reduce over time. However, it should be expected to remain as the duplication is fundamental to having an overview.
This duplication could be addressed by removing the overview. Instead, design/README.md could be restricted to listing existing designs, with no additional content.
The proposed approach assumes that the proposed overviews offer significant value for ramp-up.
Advantages:
Disadvantages:
This proposal provides some much-needed context for a lot of our discussions and deliberations about Carbon. Having a skeleton in place for the language design is an important step forward. We can't make language design decisions in a vacuum -- we need a "blurry outline" of the big picture before we can start filling in the details of any particular area. We need to establish a common frame of reference regarding the overall shape of the language, so that we can parallelize the in-depth design work.
That means that, by necessity, this proposal suggests lots of concrete design decisions that have not yet had sufficient analysis for us to affirm them. There is a shared understanding that we are not committing to any of those decisions, only to the broad picture painted by the combination of those decisions, and that all such decisions need to be revisited by another proposal before we consider them to be agreed on. There is a substantial risk of anchoring how we think about Carbon -- we’ll just have to do our best to avoid taking this doc as a given when evaluating subsequent proposals. Those proposals must justify a direction that agrees with this doc as much as one that does not agree with it.
This doc sets the stage for increasingly incremental steps towards a complete design. Establishing a structure for the design is especially helpful as it will show how things do or do not connect across the language.
Adopting this largely work-in-progress overview in order to see the structure of things, while still needing to resolve the specifics in each area, will directly help reinforce our goal of language evolution over time. This will help us learn how to effectively iterate, and how to compensate and overcome the risks of anchoring, change aversion, and other challenges.