Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
Readme/Additional Features BA & BC: Move sections to new documents
Browse files Browse the repository at this point in the history
See #25.
  • Loading branch information
js-choi committed Mar 26, 2018
1 parent faa00a0 commit 05b42cc
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 86 deletions.
43 changes: 43 additions & 0 deletions additional-feature-ba.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,46 @@
## Additional Feature BA
Another additional feature – **bare awaited calls** – makes async function calls
terser. It adds another mode to bare style: if a bare-style pipeline step is
preceded by a `await`, then instead of a mere function call, it is an awaited
function call. `value |> await object.asyncFunction` is equivalent to `await
object.asyncFunction(value)`. This is backwards compatible with the [Core
Proposal][] as well as all other [additional features][].

[Additional Feature BA is **formally specified in in the draft
specification**][formal BC].

<table>
<thead>
<tr>
<th>With smart pipelines
<th>Status quo

<tbody>
<tr>
<td>

```js
value
|> # + '!'
|> new User.Message(#)
|> await stream.write
|> console.log;
```

<td>

```js
console.log(
await stream.write(
new User.Message(
value + '!'
)
)
);
```

</table>

[“data-to-ink” visual ratio]: https://www.darkhorseanalytics.com/blog/data-looks-better-naked
[“don’t break my code”]: ./goals.md#dont-break-my-code
[“don’t make me overthink”]: ./goals.md#dont-make-me-overthink
Expand Down
43 changes: 43 additions & 0 deletions additional-feature-bc.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,46 @@
## Additional Feature BC
An additional feature – **bare constructor calls** – makes constructor calls
terser. It adds a mode to bare style: if a bare-style pipeline step is preceded
by a `new`, then instead of a function call, it is a constructor call. `value |>
object.Constructor` is equivalent to `object.Constructor(value)`. This is
backwards compatible with the [Core Proposal][] as well as all other [additional
features][].

[Additional Feature BC is **formally specified in in the draft
specification**][formal BC].

<table>
<thead>
<tr>
<th>With smart pipelines
<th>Status quo

<tbody>
<tr>
<td>

```js
value
|> # + '!'
|> new User.Message
|> await stream.write(#)
|> console.log;
```

<td>

```js
console.log(
await stream.write(
new User.Message(
value + '!'
)
)
);
```

</table>

[“data-to-ink” visual ratio]: https://www.darkhorseanalytics.com/blog/data-looks-better-naked
[“don’t break my code”]: ./goals.md#dont-break-my-code
[“don’t make me overthink”]: ./goals.md#dont-make-me-overthink
Expand Down
86 changes: 0 additions & 86 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -1766,92 +1766,6 @@ function castPath (value, object) {

</table>

## Additional Feature BC
An additional feature – **bare constructor calls** – makes constructor calls
terser. It adds a mode to bare style: if a bare-style pipeline step is preceded
by a `new`, then instead of a function call, it is a constructor call. `value |>
object.Constructor` is equivalent to `object.Constructor(value)`. This is
backwards compatible with the [Core Proposal][] as well as all other [additional
features][].

[Additional Feature BC is **formally specified in in the draft
specification**][formal BC].

<table>
<thead>
<tr>
<th>With smart pipelines
<th>Status quo

<tbody>
<tr>
<td>

```js
value
|> # + '!'
|> new User.Message
|> await stream.write(#)
|> console.log;
```

<td>

```js
console.log(
await stream.write(
new User.Message(
value + '!'
)
)
);
```

</table>

## Additional Feature BA
Another additional feature – **bare awaited calls** – makes async function calls
terser. It adds another mode to bare style: if a bare-style pipeline step is
preceded by a `await`, then instead of a mere function call, it is an awaited
function call. `value |> await object.asyncFunction` is equivalent to `await
object.asyncFunction(value)`. This is backwards compatible with the [Core
Proposal][] as well as all other [additional features][].

[Additional Feature BA is **formally specified in in the draft
specification**][formal BC].

<table>
<thead>
<tr>
<th>With smart pipelines
<th>Status quo

<tbody>
<tr>
<td>

```js
value
|> # + '!'
|> new User.Message(#)
|> await stream.write
|> console.log;
```

<td>

```js
console.log(
await stream.write(
new User.Message(
value + '!'
)
)
);
```

</table>

# Appendices
## Smart step syntax
Most pipeline steps will use topic references in their steps. This style of
Expand Down

0 comments on commit 05b42cc

Please sign in to comment.