From 0d55313589577503772189b05cad3bb46e149204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=C2=A0S=2E=C2=A0Choi?= Date: Sat, 16 Oct 2021 10:07:25 -0400 Subject: [PATCH] Revert change from % to ^ (#250) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As per https://github.com/tc39/proposal-pipeline-operator/issues/91#issuecomment-926357211, I think my [change of the spec from `%` to `^`](https://github.com/tc39/proposal-pipeline-operator/issues/91#issuecomment-911851451) was premature, partially because I now mildly prefer `%` again, but mostly because it’s what we presented to plenary on August and because it’s what Babel currently supports (see babel/babel#13749). This is a tentative change and has no bearing on what the actual final topic token will be. It’s just a swap to the explainer and spec back to what we presented to the Committee plenary on August. This will be almost certainly be the last time I switch the topic token until we hold our TC39 incubator sessions for bikeshedding the token in early November. --- README.md | 184 +++++++++++++++++++++++++++--------------------------- spec.html | 120 +++++++++++++++++------------------ 2 files changed, 152 insertions(+), 152 deletions(-) diff --git a/README.md b/README.md index 528ba1b..dbf68e9 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,10 @@ * **[Proposal history][]** * **Babel plugin**: [Implemented in v7.15][Babel 7.15]. See [Babel documentation][]. -(This document presumptively uses `^` +(This document presumptively uses `%` as the placeholder token for the topic reference. This [choice of token is not a final decision][token bikeshedding]; -`^` could instead be `%`, or many other tokens.) +`%` could instead be `^`, or many other tokens.) [specification]: http://tc39.github.io/proposal-pipeline-operator/ [Babel 7.15]: https://babeljs.io/blog/2021/07/26/7.15.0#hack-style-pipeline-operator-support-13191httpsgithubcombabelbabelpull13191-13416httpsgithubcombabelbabelpull13416 @@ -155,15 +155,15 @@ console.log( ``` …we can **untangle** it as such using a pipe operator -and a placeholder token (`^`) standing in for the previous operation’s value: +and a placeholder token (`%`) standing in for the previous operation’s value: ```js Object.keys(envars) .map(envar => `${envar}=${envars[envar]}`) .join(' ') - |> `$ ${^}` - |> chalk.dim(^, 'node', args.join(' ')) - |> console.log(^); + |> `$ ${%}` + |> chalk.dim(%, 'node', args.join(' ')) + |> console.log(%); ``` Now, the human reader can **rapidly find** the **initial data** @@ -190,9 +190,9 @@ For example, using our previous modified Object.keys(envars) .map(envar => `${envar}=${envars[envar]}`) .join(' ') - |> `$ ${^}` - |> chalk.dim(^, 'node', args.join(' ')) - |> console.log(^); + |> `$ ${%}` + |> chalk.dim(%, 'node', args.join(' ')) + |> console.log(%); ``` …a version using temporary variables would look like this: @@ -280,10 +280,10 @@ code outside of each step cannot change its binding. ```js let _; _ = one() - |> double(^) + |> double(%) |> Promise.resolve().then(() => // This prints 2, as intended. - console.log(^)); + console.log(%)); _ = one(); ``` @@ -330,7 +330,7 @@ const envVarFormat = vars => Object.keys(vars) .map(var => `${var}=${vars[var]}`) .join(' ') - |> chalk.dim(^, 'node', args.join(' ')); + |> chalk.dim(%, 'node', args.join(' ')); ``` @@ -356,9 +356,9 @@ return (