mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-16 06:58:10 +00:00
Proposal to support a limited set of implicit conversions. This would generally permit only implicit conversions that are lossless and semantics-preserving. In particular, this proposal allows: - Conversion from an integer type to a wider integer type of the same signedness, and from an unsigned integer type to a wider signed integer type. - Conversion from an integer type to a floating-point type that has enough mantissa bits to exactly represent all integers in the source type. - Conversion from integer literals to integer and floating-point types that can represent them. - Conversion from floating-point literals to floating-point types that can represent them. - Conversions required for generics: conversions of values between facet types, and conversions of types between type-of-types, as described in the generics proposals. - Conversions required for inheritance: derived-to-base conversions for class pointers and class values. Other conversions, such as lossy conversions between arithmetic types and conversions between bool and other types are not supported. Co-authored-by: josh11b <josh11b@users.noreply.github.com> Co-authored-by: Chandler Carruth <chandlerc@gmail.com> Co-authored-by: Geoff Romer <gromer@google.com>
Proposals
This directory contains accepted proposals for the carbon-lang repository. For information about declined/deferred proposals, please view the proposal's original pull request.
For accepted proposals, where #### is the corresponding proposal's pull
request:
p####.mdwill contain the main proposal text.p####may be present as an optional subdirectory for related files (for example, images).
Proposal list
- 0024 - Generics goals
- 0029 - Linear, rebase, and pull-request GitHub workflow
- 0042 - Create code review guidelines
- 0044 - Proposal tracking
- 0051 - Goals
- 0063 - Criteria for Carbon to go public
- 0074 - Change comment/decision timelines in proposal process
- 0083 - In-progress design overview
- 0107 - Code and name organization
- 0113 - Add a C++ style guide
- 0120 - Add idiomatic code performance and developer-facing docs to goals
- 0142 - Unicode source files
- 0143 - Numeric literals
- 0149 - Change documentation style guide
- 0157 - Design direction for sum types
- 0162 - Basic Syntax
- 0175 - C++ interoperability goals
- 0179 - Create a toolchain team.
- 0196 - Language-level safety strategy
- 0198 - Comments
- 0199 - String literals
- 0253 - 2021 Roadmap
- 0257 - Initialization of memory and variables
- 0285 - if/else
- 0301 - Principle: Errors are values
- 0339 -
varstatement - 0340 - while loops
- 0353 -
forloops - 0415 - Syntax:
return - 0426 - Governance & evolution revamp
- 0438 - Functions
- 0444 - GitHub Discussions
- 0447 - Generics terminology
- 0524 - Generics overview
- 0538 -
returnwith no argument - 0540 - Remove
Void - 0553 - Generics details part 1
- 0555 - Operator precedence
- 0561 - Basic classes: use cases, struct literals, struct types, and future work
- 0601 - Operator tokens
- 0618 - var ordering
- 0623 - Require braces
- 0646 - Low context-sensitivity principle
- 0676 -
:!generic syntax - 0680 - And, or, not
- 0722 - Nominal classes and methods
- 0731 - Generics details 2: adapters, associated types, parameterized interfaces
- 0752 -
apifile default-public - 0777 - Inheritance
- 0820 - Implicit conversions
- 0829 - One way principle