{"action":"created","issue":{"url":"https://api.github.com/repos/jashkenas/coffeescript/issues/4966","repository_url":"https://api.github.com/repos/jashkenas/coffeescript","labels_url":"https://api.github.com/repos/jashkenas/coffeescript/issues/4966/labels{/name}","comments_url":"https://api.github.com/repos/jashkenas/coffeescript/issues/4966/comments","events_url":"https://api.github.com/repos/jashkenas/coffeescript/issues/4966/events","html_url":"https://github.com/jashkenas/coffeescript/issues/4966","id":298242057,"number":4966,"title":"CS2 Discussion: Features: Block expressions + chaining notation","user":{"login":"coffeescriptbot","id":36576729,"avatar_url":"https://avatars1.githubusercontent.com/u/36576729?v=4","gravatar_id":"","url":"https://api.github.com/users/coffeescriptbot","html_url":"https://github.com/coffeescriptbot","followers_url":"https://api.github.com/users/coffeescriptbot/followers","following_url":"https://api.github.com/users/coffeescriptbot/following{/other_user}","gists_url":"https://api.github.com/users/coffeescriptbot/gists{/gist_id}","starred_url":"https://api.github.com/users/coffeescriptbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coffeescriptbot/subscriptions","organizations_url":"https://api.github.com/users/coffeescriptbot/orgs","repos_url":"https://api.github.com/users/coffeescriptbot/repos","events_url":"https://api.github.com/users/coffeescriptbot/events{/privacy}","received_events_url":"https://api.github.com/users/coffeescriptbot/received_events","type":"User","site_admin":false},"labels":[{"id":841194363,"url":"https://api.github.com/repos/jashkenas/coffeescript/labels/new%20feature","name":"new feature","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-02-19T11:27:05Z","updated_at":"2018-02-19T11:27:16Z","closed_at":"2018-02-19T11:27:05Z","author_association":"COLLABORATOR","body":"_From @edemaine on [2017-02-23 14:36](https://github.com/coffeescript6/discuss/issues/73)_\n\n\n[CoffeeScript's chaining syntax](http://coffeescript.org/#1.7.0) allows a leading `.method` on a line to do a method call.  It works when following a sequence of function calls, and in general it seems `Value`s in the grammar, but does not currently work for the return value of a for loop:\r\n\r\n```coffee\r\nfor x in list\r\n  x.toString()\r\n.join ', '\r\n```\r\n\r\nI'd like this to be equivalent to\r\n\r\n```coffee\r\n(for x in list\r\n  x.toString()\r\n).join ', '\r\n```\r\n\r\nAm I missing any ambiguity, or does this seem like a good thing to try to implement?\r\n\r\nSimilarly, it'd be nice to support chaining notation after if/else block expressions, e.g.:\r\n\r\n```coffee\r\nif wantA\r\n  A\r\nelse\r\n  B\r\n.attr 'color', 'red'\r\n```"},"comment":{"url":"https://api.github.com/repos/jashkenas/coffeescript/issues/comments/366662030","html_url":"https://github.com/jashkenas/coffeescript/issues/4966#issuecomment-366662030","issue_url":"https://api.github.com/repos/jashkenas/coffeescript/issues/4966","id":366662030,"user":{"login":"coffeescriptbot","id":36576729,"avatar_url":"https://avatars1.githubusercontent.com/u/36576729?v=4","gravatar_id":"","url":"https://api.github.com/users/coffeescriptbot","html_url":"https://github.com/coffeescriptbot","followers_url":"https://api.github.com/users/coffeescriptbot/followers","following_url":"https://api.github.com/users/coffeescriptbot/following{/other_user}","gists_url":"https://api.github.com/users/coffeescriptbot/gists{/gist_id}","starred_url":"https://api.github.com/users/coffeescriptbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coffeescriptbot/subscriptions","organizations_url":"https://api.github.com/users/coffeescriptbot/orgs","repos_url":"https://api.github.com/users/coffeescriptbot/repos","events_url":"https://api.github.com/users/coffeescriptbot/events{/privacy}","received_events_url":"https://api.github.com/users/coffeescriptbot/received_events","type":"User","site_admin":false},"created_at":"2018-02-19T11:27:15Z","updated_at":"2018-02-19T11:27:15Z","author_association":"COLLABORATOR","body":"_From @GeoffreyBooth on [2017-11-26 02:11](https://github.com/coffeescript6/discuss/issues/73#issuecomment-346978940)_\n\n\nClosing this as there hasn’t appeared to be much interest.\r\n\r\nAlso, having gone through all the open issues in the main repo, I can say that introducing chaining syntax was an unequivocal mistake. It has led to more bugs than perhaps any other feature, and it goes against CoffeeScript’s significant whitespace design principle. (That’s probably _why_ its implementation has been so buggy.) We shouldn’t be extending it any further. If we ever release a version 3 that doesn’t try to be as reverent of backward compatibility, chaining syntax would probably be one of the first things to go (you would need to use the backslash line continuation if you want to preserve the style)."}}
{"actor":{"display_login":"coffeescriptbot"}}