From 18e0ce611d798bbe5756f41a5ce84082c9604f4b Mon Sep 17 00:00:00 2001 From: Josh L Date: Fri, 30 Jun 2023 21:08:30 +0000 Subject: [PATCH 1/3] Filling out template with PR 2964 --- proposals/p2964.md | 70 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 proposals/p2964.md diff --git a/proposals/p2964.md b/proposals/p2964.md new file mode 100644 index 0000000000000..6e61981a495e0 --- /dev/null +++ b/proposals/p2964.md @@ -0,0 +1,70 @@ +# Expression phase terminology + + + +[Pull request](https://github.com/carbon-language/carbon-lang/pull/2964) + + + +## Table of contents + +- [Abstract](#abstract) +- [Problem](#problem) +- [Background](#background) +- [Proposal](#proposal) +- [Details](#details) +- [Rationale](#rationale) +- [Alternatives considered](#alternatives-considered) + + + +## Abstract + +TODO: Describe, in a succinct paragraph, the gist of this document. This +paragraph should be reproduced verbatim in the PR summary. + +## Problem + +TODO: What problem are you trying to solve? How important is that problem? Who +is impacted by it? + +## Background + +TODO: Is there any background that readers should consider to fully understand +this problem and your approach to solving it? + +## Proposal + +TODO: Briefly and at a high level, how do you propose to solve the problem? Why +will that in fact solve it? + +## Details + +TODO: Fully explain the details of the proposed solution. + +## Rationale + +TODO: How does this proposal effectively advance Carbon's goals? Rather than +re-stating the full motivation, this should connect that motivation back to +Carbon's stated goals and principles. This may evolve during review. Use links +to appropriate sections of [`/docs/project/goals.md`](/docs/project/goals.md), +and/or to documents in [`/docs/project/principles`](/docs/project/principles). +For example: + +- [Community and culture](/docs/project/goals.md#community-and-culture) +- [Language tools and ecosystem](/docs/project/goals.md#language-tools-and-ecosystem) +- [Performance-critical software](/docs/project/goals.md#performance-critical-software) +- [Software and language evolution](/docs/project/goals.md#software-and-language-evolution) +- [Code that is easy to read, understand, and write](/docs/project/goals.md#code-that-is-easy-to-read-understand-and-write) +- [Practical safety and testing mechanisms](/docs/project/goals.md#practical-safety-and-testing-mechanisms) +- [Fast and scalable development](/docs/project/goals.md#fast-and-scalable-development) +- [Modern OS platforms, hardware architectures, and environments](/docs/project/goals.md#modern-os-platforms-hardware-architectures-and-environments) +- [Interoperability with and migration from existing C++ code](/docs/project/goals.md#interoperability-with-and-migration-from-existing-c-code) + +## Alternatives considered + +TODO: What alternative solutions have you considered? From b61748809083ab43333fcd81df3ddf058153c12b Mon Sep 17 00:00:00 2001 From: Josh L Date: Fri, 30 Jun 2023 23:41:39 +0000 Subject: [PATCH 2/3] Expression phase terminology --- proposals/p2964.md | 79 ++++++++++++++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 28 deletions(-) diff --git a/proposals/p2964.md b/proposals/p2964.md index 6e61981a495e0..9335be8495e02 100644 --- a/proposals/p2964.md +++ b/proposals/p2964.md @@ -16,7 +16,6 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - [Problem](#problem) - [Background](#background) - [Proposal](#proposal) -- [Details](#details) - [Rationale](#rationale) - [Alternatives considered](#alternatives-considered) @@ -24,47 +23,71 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ## Abstract -TODO: Describe, in a succinct paragraph, the gist of this document. This -paragraph should be reproduced verbatim in the PR summary. +Update terminology around expression properties: + +- "value phase" -> "expression phase" +- "symbolic value" -> "symbolic constant" +- "constant" -> "template constant" +- "constant or symbolic value" -> "constant" + +Implements the decision in +[#1391](https://github.com/carbon-language/carbon-lang/issues/1391). ## Problem -TODO: What problem are you trying to solve? How important is that problem? Who -is impacted by it? +There are a few concerns with the current terminology: + +- We were not happy with it at the time it was introduced in + [proposal #1378](https://github.com/carbon-language/carbon-lang/pull/1378/files/198c7bd152bc4e223f1fc2484455e17ba31f19f9#r921592116), + but didn't want to block that proposal on finding better names. +- It is a property of expressions, not values. We are switching from "value + categories" to "expression categories" for the same reason. See + [proposal #2006](https://github.com/carbon-language/carbon-lang/pull/2006) + and [PR #2744](https://github.com/carbon-language/carbon-lang/pull/2744). +- No good term for the bindings that use `:!`, which share a number of + properties, and often we want to refer to those together. + +The concerns about the names of the individual phases led to +[questions-for-leads issue #1391: New name for "constant" value phase](https://github.com/carbon-language/carbon-lang/issues/1391). +This proposal implements the resolution from that issue. ## Background -TODO: Is there any background that readers should consider to fully understand -this problem and your approach to solving it? +The current names were introduced in +[proposal #1378: Design overview update part 7: values](https://github.com/carbon-language/carbon-lang/pull/1378) +based on a discussion in +[#typesystem on Discord](https://discord.com/channels/655572317891461132/708431657849585705/996547601451204630). +I am not aware of corresponding terminology in other programming languages. ## Proposal -TODO: Briefly and at a high level, how do you propose to solve the problem? Why -will that in fact solve it? +We update terminology around expression properties, specifically what we +previously referred to as "value phase" and values it can have, as follows: -## Details +- "value phase" -> "expression phase": since this is a property of + expressions, not values. +- "symbolic value" -> "symbolic constant": for symbolic compile-time values + like checked-generic parameters. +- "constant" -> "template constant": for compile-time values where the value + is available during type checking, like literals and `template` parameters. -TODO: Fully explain the details of the proposed solution. +By making these last two terms both end in "constant," we allow their +combination (including all compile-time values) to be collectively referred to +using the term "constant." For example, either kind of constant may be passed to +a function with either kind of constant binding. ## Rationale -TODO: How does this proposal effectively advance Carbon's goals? Rather than -re-stating the full motivation, this should connect that motivation back to -Carbon's stated goals and principles. This may evolve during review. Use links -to appropriate sections of [`/docs/project/goals.md`](/docs/project/goals.md), -and/or to documents in [`/docs/project/principles`](/docs/project/principles). -For example: - -- [Community and culture](/docs/project/goals.md#community-and-culture) -- [Language tools and ecosystem](/docs/project/goals.md#language-tools-and-ecosystem) -- [Performance-critical software](/docs/project/goals.md#performance-critical-software) -- [Software and language evolution](/docs/project/goals.md#software-and-language-evolution) -- [Code that is easy to read, understand, and write](/docs/project/goals.md#code-that-is-easy-to-read-understand-and-write) -- [Practical safety and testing mechanisms](/docs/project/goals.md#practical-safety-and-testing-mechanisms) -- [Fast and scalable development](/docs/project/goals.md#fast-and-scalable-development) -- [Modern OS platforms, hardware architectures, and environments](/docs/project/goals.md#modern-os-platforms-hardware-architectures-and-environments) -- [Interoperability with and migration from existing C++ code](/docs/project/goals.md#interoperability-with-and-migration-from-existing-c-code) +The goals of this proposal are: + +- clearer and more concise communication, and +- making it easier for people to learn Carbon by using more consistent + terminology. + +This supports Carbon's goal of having +[Code that is easy to read, understand, and write](/docs/project/goals.md#code-that-is-easy-to-read-understand-and-write). ## Alternatives considered -TODO: What alternative solutions have you considered? +We were happy with this option and did not spend time coming up with more +alternatives. From 6ac9a6626f9ddf180aa38d3858950784963261be Mon Sep 17 00:00:00 2001 From: jonmeow Date: Thu, 6 Jul 2023 18:37:42 +0000 Subject: [PATCH 3/3] Push to execute actions