{"action":"created","issue":{"url":"https://api.github.com/repos/tc39/proposal-pipeline-operator/issues/75","repository_url":"https://api.github.com/repos/tc39/proposal-pipeline-operator","labels_url":"https://api.github.com/repos/tc39/proposal-pipeline-operator/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/tc39/proposal-pipeline-operator/issues/75/comments","events_url":"https://api.github.com/repos/tc39/proposal-pipeline-operator/issues/75/events","html_url":"https://github.com/tc39/proposal-pipeline-operator/issues/75","id":281906518,"number":75,"title":"Pipeline Placeholders","user":{"login":"gilbert","id":17013,"avatar_url":"https://avatars1.githubusercontent.com/u/17013?v=4","gravatar_id":"","url":"https://api.github.com/users/gilbert","html_url":"https://github.com/gilbert","followers_url":"https://api.github.com/users/gilbert/followers","following_url":"https://api.github.com/users/gilbert/following{/other_user}","gists_url":"https://api.github.com/users/gilbert/gists{/gist_id}","starred_url":"https://api.github.com/users/gilbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gilbert/subscriptions","organizations_url":"https://api.github.com/users/gilbert/orgs","repos_url":"https://api.github.com/users/gilbert/repos","events_url":"https://api.github.com/users/gilbert/events{/privacy}","received_events_url":"https://api.github.com/users/gilbert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":93,"created_at":"2017-12-13T21:41:26Z","updated_at":"2018-02-02T06:40:18Z","closed_at":null,"author_association":"COLLABORATOR","body":"I'd like to explore an alternative to the [partial application proposal](https://github.com/rbuckton/proposal-partial-application) that would only be used in conjunction with the pipeline operator.\r\n\r\nThere has been discussion around using `?` as a placeholder for functions with multiple arguments. Consider the readme example:\r\n\r\n```js\r\nlet person = { score: 25 };\r\n\r\nlet newScore = person.score\r\n  |> double\r\n  |> (_ => add(7, _))\r\n  |> (_ => boundScore(0, 100, _));\r\n\r\nnewScore //=> 57\r\n```\r\n\r\nIf the `?` were to be built into the pipeline operator, we could rewrite the example to the following:\r\n\r\n```js\r\nlet newScore = person.score\r\n  |> double\r\n  |> add(7, ?)\r\n  |> boundScore(0, 100, ?);\r\n```\r\n\r\nand since this placeholder is scoped to the pipeline operator, it has the potential to be more expressive:\r\n\r\n```js\r\nlet ex1 = person |> double(?.score);\r\nlet ex2 = person.score |> add(?, ?);\r\n```\r\n\r\nand potentially allow member expressions?\r\n\r\n```js\r\nlet x = 10 |> f |> ?.foo |> g;\r\n```\r\n\r\nOn the other hand, any sort of `?` placeholder might have people let write strange things like\r\n`x |> f(? ? ? : 10)`. Is this problematic?"},"comment":{"url":"https://api.github.com/repos/tc39/proposal-pipeline-operator/issues/comments/362500389","html_url":"https://github.com/tc39/proposal-pipeline-operator/issues/75#issuecomment-362500389","issue_url":"https://api.github.com/repos/tc39/proposal-pipeline-operator/issues/75","id":362500389,"user":{"login":"charmander","id":1889843,"avatar_url":"https://avatars1.githubusercontent.com/u/1889843?v=4","gravatar_id":"","url":"https://api.github.com/users/charmander","html_url":"https://github.com/charmander","followers_url":"https://api.github.com/users/charmander/followers","following_url":"https://api.github.com/users/charmander/following{/other_user}","gists_url":"https://api.github.com/users/charmander/gists{/gist_id}","starred_url":"https://api.github.com/users/charmander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charmander/subscriptions","organizations_url":"https://api.github.com/users/charmander/orgs","repos_url":"https://api.github.com/users/charmander/repos","events_url":"https://api.github.com/users/charmander/events{/privacy}","received_events_url":"https://api.github.com/users/charmander/received_events","type":"User","site_admin":false},"created_at":"2018-02-02T06:40:18Z","updated_at":"2018-02-02T06:40:18Z","author_association":"NONE","body":"> Perhaps we should consider more word-based operators (like `await`). Some of those may break existing code, though, which is tough... although as I think somebody brought up in relation to `|await>`, there aren't any operators in the language that use a symbol and characters... but maybe there should be! It could leave the language more room to grow in the future - and potentially be more readable in the short term.\r\n>\r\n> I'll throw out, just as a proof of concept, `|pipe`, `|pipef` (i.e. \"pipe function\", for the tacit version), and `|px` (\"pipe x [placeholder]\" - although even this might be too verbose for its purpose).\r\n\r\n@dallonf `x|pipe(y)` can’t change meaning."}}
{"actor":{"display_login":"charmander"}}