-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs/concept: new FAQ: list arithmetic ops removal
This adds an FAQ guide that explains the removal of list arithmetic operators ("+" and "*") from CUE v0.11 and later. Closes cue-lang/docs-and-content#178 Preview-Path: /docs/concept/faq/removing-list-arithmetic-operators-v0.11/ Signed-off-by: Jonathan Matthews <[email protected]> Change-Id: I8d50c273ccedb7cf6ca5295917032d5aa822b413 Dispatch-Trailer: {"type":"trybot","CL":1200357,"patchset":3,"ref":"refs/changes/57/1200357/3","targetBranch":"master"}
- Loading branch information
1 parent
6ccc4f0
commit ee797d4
Showing
3 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
content/docs/concept/faq/removing-list-arithmetic-operators-v0.11/en.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
title: Removing list arithmetic operators in CUE v0.11 | ||
authors: [jpluscplusm] | ||
toc_hide: true | ||
--- | ||
|
||
In early versions, the CUE language explicitly allowed arithmetic operators | ||
("`+`" and "`*`") to take list arguments. | ||
This feature was removed from the language specification | ||
[several years ago](https://review.gerrithub.io/plugins/gitiles/cue-lang/cue/+/172f0060cd405f30c5873b793e44300e1a3588cb%5E%21/), | ||
and its removal is now being completed in CUE version `v0.11`. | ||
This FAQ answers some of your questions about what's changed. | ||
|
||
## What's being removed, and from where? | ||
|
||
TODO(jcm): The operators `*` and `+` when used with list arguments will stop | ||
working with the CUE evaluator in the `cue` command, and the CUE Go API. | ||
|
||
## Why were list arithmetic operators supported until now? | ||
|
||
TODO(jcm): Because folks might have had CUE that used this syntax, but enough | ||
time has now passed without it being mentioned on cuelang.org or the CUE | ||
language spec that we can assume it's not being used by anyone. | ||
|
||
## What's the replacement for list arithmetic operators? | ||
|
||
TODO(jcm): list.Repeat(), list.Concat(), and nested for loops. Show examples. | ||
|
||
## Which version of CUE removes list arithmetic operators? | ||
|
||
TODO(jcm): any version that starts `v0.11`. | ||
|
||
## Am I affected? | ||
|
||
TODO(jcm): probably not. FIXME: how to check? | ||
|
||
## I *am* affected! How can I fix my CUE? | ||
|
||
TODO(jcm): `cue fix` examples. Manual fixup examples. |
3 changes: 3 additions & 0 deletions
3
content/docs/concept/faq/removing-list-arithmetic-operators-v0.11/page.cue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package site | ||
|
||
content: docs: concept: faq: "removing-list-arithmetic-operators-v0.11": page: _ |
39 changes: 39 additions & 0 deletions
39
hugo/content/en/docs/concept/faq/removing-list-arithmetic-operators-v0.11/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
title: Removing list arithmetic operators in CUE v0.11 | ||
authors: [jpluscplusm] | ||
toc_hide: true | ||
--- | ||
|
||
In early versions, the CUE language explicitly allowed arithmetic operators | ||
("`+`" and "`*`") to take list arguments. | ||
This feature was removed from the language specification | ||
[several years ago](https://review.gerrithub.io/plugins/gitiles/cue-lang/cue/+/172f0060cd405f30c5873b793e44300e1a3588cb%5E%21/), | ||
and its removal is now being completed in CUE version `v0.11`. | ||
This FAQ answers some of your questions about what's changed. | ||
|
||
## What's being removed, and from where? | ||
|
||
TODO(jcm): The operators `*` and `+` when used with list arguments will stop | ||
working with the CUE evaluator in the `cue` command, and the CUE Go API. | ||
|
||
## Why were list arithmetic operators supported until now? | ||
|
||
TODO(jcm): Because folks might have had CUE that used this syntax, but enough | ||
time has now passed without it being mentioned on cuelang.org or the CUE | ||
language spec that we can assume it's not being used by anyone. | ||
|
||
## What's the replacement for list arithmetic operators? | ||
|
||
TODO(jcm): list.Repeat(), list.Concat(), and nested for loops. Show examples. | ||
|
||
## Which version of CUE removes list arithmetic operators? | ||
|
||
TODO(jcm): any version that starts `v0.11`. | ||
|
||
## Am I affected? | ||
|
||
TODO(jcm): probably not. FIXME: how to check? | ||
|
||
## I *am* affected! How can I fix my CUE? | ||
|
||
TODO(jcm): `cue fix` examples. Manual fixup examples. |