-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Design overview update part 3: Safety #1328
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial pass over the text. Much of this is trying to just improve the flow / wording, not trying to change anything significant.
docs/design/README.md
Outdated
Carbon's clean grammar provides a simple and effective platform for adding | ||
necessary syntax to annotate more precise semantics. This requires a systematic | ||
cleanup and simplification of C++'s syntax and grammar, which is inherently a | ||
backwards incompatible change. Grammar changes are actually among the cheapest | ||
migrations since they are perfect for tooling and automation. This opens up | ||
opportunities to provide easy pattern recognition and familiar syntactic anchors | ||
for humans. It also simplifies compilers, IDEs, and tooling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More suggested cleanups:
Carbon's clean grammar provides a simple and effective platform for adding | |
necessary syntax to annotate more precise semantics. This requires a systematic | |
cleanup and simplification of C++'s syntax and grammar, which is inherently a | |
backwards incompatible change. Grammar changes are actually among the cheapest | |
migrations since they are perfect for tooling and automation. This opens up | |
opportunities to provide easy pattern recognition and familiar syntactic anchors | |
for humans. It also simplifies compilers, IDEs, and tooling. | |
Carbon's clean grammar provides a simple and effective platform for adding more precise semantic annotations to the syntax. However, we designed the synatx to retain as much pattern recognition and familiar syntactic anchors as possible for humans while making the improvements. Beyond allowing easy development of semantic annotations, the simplified synatx also simplifies compilers, IDEs, and tooling for the language. |
Not sure this paragraph carries its weight though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted the paragraph.
docs/design/README.md
Outdated
Once we have the ability to migrate C++ code to Carbon's simplified grammar, the | ||
next step is to introduce the building blocks for safety. These are things we | ||
need to add (relative to C++) without breaking migration. Rust can illustrate | ||
exactly why we need these specific features, but we need to also have a | ||
migration story for them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this isn't saying much beyond what was above and in the bullet points. WDYT?
I'd be fine maybe just removing this paragraph and the previous (even after my edit) if you don't think they're adding much. The more interesting part seems the next two paragraphs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleting.
Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM, especially as a good starting point. As discussed when we were talking, good to make sure we're doing a good job of representing the state of interop in the Rust world and the on-going efforts there, but feel free to land and update that paragraph in follow-ups or land with any improvements you get for that paragraph.
This follows #1274 , #1325 , #1328 , #1336 , #1347 , and #1368 . This fills in details about how values work, value categories, parameter passing, unformed state, and so on. Co-authored-by: Geoff Romer <gromer@google.com> Co-authored-by: Richard Smith <richard@metafoo.co.uk> Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
This follows #1274 and #1325 and fills in the "safety" section. It only covers our approach in general terms.