{"action":"created","issue":{"url":"https://api.github.com/repos/tc39/proposal-optional-chaining/issues/47","repository_url":"https://api.github.com/repos/tc39/proposal-optional-chaining","labels_url":"https://api.github.com/repos/tc39/proposal-optional-chaining/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/tc39/proposal-optional-chaining/issues/47/comments","events_url":"https://api.github.com/repos/tc39/proposal-optional-chaining/issues/47/events","html_url":"https://github.com/tc39/proposal-optional-chaining/issues/47","id":299667481,"number":47,"title":"concise or readable? which one would you choose?","user":{"login":"axetroy","id":9758711,"avatar_url":"https://avatars2.githubusercontent.com/u/9758711?v=4","gravatar_id":"","url":"https://api.github.com/users/axetroy","html_url":"https://github.com/axetroy","followers_url":"https://api.github.com/users/axetroy/followers","following_url":"https://api.github.com/users/axetroy/following{/other_user}","gists_url":"https://api.github.com/users/axetroy/gists{/gist_id}","starred_url":"https://api.github.com/users/axetroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axetroy/subscriptions","organizations_url":"https://api.github.com/users/axetroy/orgs","repos_url":"https://api.github.com/users/axetroy/repos","events_url":"https://api.github.com/users/axetroy/events{/privacy}","received_events_url":"https://api.github.com/users/axetroy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-23T10:35:10Z","updated_at":"2018-02-23T17:22:31Z","closed_at":null,"author_association":"NONE","body":"```javascript\r\na?.b.c?.d(x?.y.z, m?.n)\r\n\r\n// same with\r\nfunc(argument1, argument2)\r\n```\r\n\r\nIf the proposal become true.\r\n\r\nmaybe someone will write like this anti-human code. it's unreadable.\r\n\r\nIn fact, we can do this with ``lodash.get``\r\n\r\nAlthough increasing the amount of code, but it readable\r\n\r\n```javascript\r\nconst func = lodash.get(a, [\"b\", \"c\", \"d\"]);\r\nconst arg1 = lodash.get(x, [\"y\", \"x\"]);\r\nconst arg2 = lodash.get(m, [\"n\"]);\r\n\r\nfunc && func(arg1, arg2);\r\n```\r\n\r\nIs it worth it?\r\n\r\nWhich one would you choose?\r\n\r\n- [ ] concise code\r\n- [ ] readable code"},"comment":{"url":"https://api.github.com/repos/tc39/proposal-optional-chaining/issues/comments/368077610","html_url":"https://github.com/tc39/proposal-optional-chaining/issues/47#issuecomment-368077610","issue_url":"https://api.github.com/repos/tc39/proposal-optional-chaining/issues/47","id":368077610,"user":{"login":"franklinyu","id":3153452,"avatar_url":"https://avatars0.githubusercontent.com/u/3153452?v=4","gravatar_id":"","url":"https://api.github.com/users/franklinyu","html_url":"https://github.com/franklinyu","followers_url":"https://api.github.com/users/franklinyu/followers","following_url":"https://api.github.com/users/franklinyu/following{/other_user}","gists_url":"https://api.github.com/users/franklinyu/gists{/gist_id}","starred_url":"https://api.github.com/users/franklinyu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franklinyu/subscriptions","organizations_url":"https://api.github.com/users/franklinyu/orgs","repos_url":"https://api.github.com/users/franklinyu/repos","events_url":"https://api.github.com/users/franklinyu/events{/privacy}","received_events_url":"https://api.github.com/users/franklinyu/received_events","type":"User","site_admin":false},"created_at":"2018-02-23T17:22:31Z","updated_at":"2018-02-23T17:22:31Z","author_association":"NONE","body":"Not the same thing. `lodash.get(a, [\"b\", \"c\", \"d\"])` is only equivalent to `a?.b?.c?.d`; it lacks the functionality to specify required member."}}
{"actor":{"display_login":"franklinyu"}}