{"action":"created","issue":{"url":"https://api.github.com/repos/tc39/proposal-class-fields/issues/100","repository_url":"https://api.github.com/repos/tc39/proposal-class-fields","labels_url":"https://api.github.com/repos/tc39/proposal-class-fields/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/tc39/proposal-class-fields/issues/100/comments","events_url":"https://api.github.com/repos/tc39/proposal-class-fields/issues/100/events","html_url":"https://github.com/tc39/proposal-class-fields/issues/100","id":320925205,"node_id":"MDU6SXNzdWUzMjA5MjUyMDU=","number":100,"title":"A summary of feedback regarding the # sigil prefix","user":{"login":"glen-84","id":261509,"node_id":"MDQ6VXNlcjI2MTUwOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/261509?v=4","gravatar_id":"","url":"https://api.github.com/users/glen-84","html_url":"https://github.com/glen-84","followers_url":"https://api.github.com/users/glen-84/followers","following_url":"https://api.github.com/users/glen-84/following{/other_user}","gists_url":"https://api.github.com/users/glen-84/gists{/gist_id}","starred_url":"https://api.github.com/users/glen-84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glen-84/subscriptions","organizations_url":"https://api.github.com/users/glen-84/orgs","repos_url":"https://api.github.com/users/glen-84/repos","events_url":"https://api.github.com/users/glen-84/events{/privacy}","received_events_url":"https://api.github.com/users/glen-84/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":256,"created_at":"2018-05-07T19:25:26Z","updated_at":"2018-10-13T06:11:22Z","closed_at":"2018-10-10T14:16:03Z","author_association":"NONE","body":"<table>\r\n    <thead>\r\n        <tr>\r\n            <th>Issue/comment</th>\r\n            <th>👍</th>\r\n            <th>👎</th>\r\n            <th>🎉</th>\r\n            <th>❤️</th>\r\n        </tr>\r\n    </thead>\r\n    <tbody>\r\n        <tr>\r\n            <td><a href=\"https://github.com/tc39/proposal-private-methods/issues/10\">Stop this proposal</a></td>\r\n            <td>156</td>\r\n            <td>27</td>\r\n            <td>11</td>\r\n            <td>35</td>\r\n        </tr>\r\n        <tr>\r\n            <td><a href=\"https://github.com/tc39/proposal-private-fields/issues/14\">Why not use the \"private\" keyword, like Java or C#?</a></td>\r\n            <td>124</td>\r\n            <td>7</td>\r\n            <td>11</td>\r\n            <td>4</td>\r\n        </tr>\r\n        <tr>\r\n            <td><a href=\"https://github.com/tc39/proposal-private-fields/issues/14#issuecomment-216042553\">Why not use the \"private\" keyword, like Java or C#?</a> 💬</td>\r\n            <td>137</td>\r\n            <td>0</td>\r\n            <td>15</td>\r\n            <td>8</td>\r\n        </tr>\r\n        <tr>\r\n            <td><a href=\"https://github.com/tc39/proposal-private-fields/issues/14#issuecomment-216304000\">Why not use the \"private\" keyword, like Java or C#?</a> 💬</td>\r\n            <td>48</td>\r\n            <td>0</td>\r\n            <td>0</td>\r\n            <td>0</td>\r\n        </tr>\r\n        <tr>\r\n            <td><a href=\"https://github.com/tc39/proposal-class-fields/issues/6\">Private Properties Syntax</a></td>\r\n            <td>33</td>\r\n            <td>4</td>\r\n            <td>0</td>\r\n            <td>0</td>\r\n        </tr>\r\n        <tr>\r\n            <td><a href=\"https://github.com/tc39/proposal-private-methods/issues/20\">New, more JS-like syntax</a></td>\r\n            <td>31</td>\r\n            <td>4</td>\r\n            <td>0</td>\r\n            <td>0</td>\r\n        </tr>\r\n        <tr>\r\n            <td><a href=\"https://github.com/tc39/proposal-class-fields/issues/77\">Please do not use \"#\"</a></td>\r\n            <td>30</td>\r\n            <td>0</td>\r\n            <td>1</td>\r\n            <td>1</td>\r\n        </tr>\r\n        <tr>\r\n            <td><a href=\"https://github.com/tc39/proposal-private-methods/issues/28\">Yet another approach to a more JS-like syntax</a></td>\r\n            <td>25</td>\r\n            <td>0</td>\r\n            <td>0</td>\r\n            <td>38</td>\r\n        </tr>\r\n        <tr>\r\n            <td><a href=\"https://github.com/tc39/proposal-class-fields/issues/56\">Proposal: keyword to replace `#` sigil</a></td>\r\n            <td>18</td>\r\n            <td>0</td>\r\n            <td>0</td>\r\n            <td>1</td>\r\n        </tr>\r\n        <tr>\r\n            <td><a href=\"https://github.com/tc39/proposal-private-methods/issues/8\">Why not use private keyword instead of #?</a></td>\r\n            <td>16</td>\r\n            <td>0</td>\r\n            <td>0</td>\r\n            <td>1</td>\r\n        </tr>\r\n        <tr>\r\n            <td><a href=\"https://github.com/zenparsing/js-classes-1.1/issues/40\">Explore a more JS-like syntax</a></td>\r\n            <td>7</td>\r\n            <td>0</td>\r\n            <td>0</td>\r\n            <td>0</td>\r\n        </tr>\r\n        <tr>\r\n            <td><a href=\"https://github.com/tc39/proposal-class-fields/issues/99\">The '#' looks awful, please change it</a></td>\r\n            <td>6</td>\r\n            <td>4</td>\r\n            <td>0</td>\r\n            <td>0</td>\r\n        </tr>\r\n        <tr>\r\n            <td><a href=\"https://github.com/tc39/proposal-private-fields/issues/92\">can we just use private keyword?</a></td>\r\n            <td>2</td>\r\n            <td>0</td>\r\n            <td>0</td>\r\n            <td>0</td>\r\n        </tr>\r\n    </tbody>\r\n</table>\r\n\r\nOther feedback:\r\n\r\n* http://2ality.com/2017/07/class-fields.html\r\n    * From the comments: \"I'd rather shoot myself in the face than use hashtags for private fields.\"\r\n        * 33 upvotes (comments closed)\r\n\r\nThe TypeScript team are [not fond of](https://github.com/Microsoft/TypeScript/issues/16415) the syntax either.\r\n\r\nMy suggestion to rename the proposal: https://github.com/tc39/proposal-private-fields/issues/72\r\n(the idea is mainly about making it a lower-level feature, and making room for a cleaner syntax at a later date)\r\n\r\n@littledan @bakkot @ljharb – I apologize in advance, as I know that you must be thinking \"Oh g*d, not again!\", but I just wanted to put this all in one place, and allow the community to share their opinion in the form of reactions. It would be great if you could keep this open for a while (30 days?), or perhaps even indefinitely to prevent other users from submitting even more issues on the same topic.\r\n\r\nTo the non-committee members reading this: These proposals are now at stage 3, so it's unlikely that a syntax change will occur, but please feel free to up-vote this issue if you feel that the sigil (`#`) prefix is not a good fit for the language, or down-vote the issue if you believe that it's perfectly acceptable."},"comment":{"url":"https://api.github.com/repos/tc39/proposal-class-fields/issues/comments/429514739","html_url":"https://github.com/tc39/proposal-class-fields/issues/100#issuecomment-429514739","issue_url":"https://api.github.com/repos/tc39/proposal-class-fields/issues/100","id":429514739,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTUxNDczOQ==","user":{"login":"bakkot","id":1653598,"node_id":"MDQ6VXNlcjE2NTM1OTg=","avatar_url":"https://avatars2.githubusercontent.com/u/1653598?v=4","gravatar_id":"","url":"https://api.github.com/users/bakkot","html_url":"https://github.com/bakkot","followers_url":"https://api.github.com/users/bakkot/followers","following_url":"https://api.github.com/users/bakkot/following{/other_user}","gists_url":"https://api.github.com/users/bakkot/gists{/gist_id}","starred_url":"https://api.github.com/users/bakkot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakkot/subscriptions","organizations_url":"https://api.github.com/users/bakkot/orgs","repos_url":"https://api.github.com/users/bakkot/repos","events_url":"https://api.github.com/users/bakkot/events{/privacy}","received_events_url":"https://api.github.com/users/bakkot/received_events","type":"User","site_admin":false},"created_at":"2018-10-13T06:11:22Z","updated_at":"2018-10-13T06:11:22Z","author_association":"CONTRIBUTOR","body":"@hax:\r\n\r\n> I'm not there and don't know what happend. Let me guess, Brendan use `this.x` which he really mean `this->x`?\r\n\r\nYes.\r\n\r\n> If that, it's also possible write `this.#x` as `this.x`.\r\n\r\nYes. But I believe the risk is much lower; that after people have used the syntax for a while they will be able to write code without commonly tripping over this, whereas I do not expect that to be the case if the field declaration uses a keyword and no sigil.\r\n\r\n> When I say _syntax matters_, I still put semantic clarity as the most important factor.\r\n\r\nI think semantic clarity matters, but yes, I agree that I put other things higher than it.\r\n\r\nThe thing is, people can learn the correspondence between novel syntax and semantics, even if the syntax does not spell out its semantics. (I happen to think the correspondence in this proposal is quite easy to learn, but I agree it will require learning.) But having learned it, it stays learned. People encountering the syntax for the first time can recognize it as something they'll need to learn about; people who've been using it for a while will not need to think about it and can get on with the business of writing code. That, I think, is an extremely important characteristic. I think it is one the classes 1.1 proposal lacks.\r\n\r\n> And because you insist `.` presence in the first step\r\n\r\nAgain, I don't actually insist on this. I'd've been ok with `this#x`. I think it's worse, but not fatal. As I said, I insist only that if the syntax for access is unfamiliar, then the syntax for declaration must be as well (at least as long as it is impractical to make the familiar syntax for access an error).\r\n\r\n> Semantic clarity | Inevitable No | Yes\r\n> -- | -- | --\r\n\r\nI don't agree with this. I think the current syntax better suggests its semantics for the _vast_ majority of usages.\r\n\r\nIt's not a regular property access, as is obvious from the `#`. But it is a great deal like a regular property access in any place where you would be able to read or write it.\r\n\r\n> We just add `**` (even there is some operator precedence issue).\r\n\r\n`**` is an extremely interesting case study. The decision to make it an error for the left side of the operator to be an unparenthesized unary expression was quite controversial, and even still many people I talked to about it intuitively object to it, just as many people object to the current proposal. It's quite an unpopular decision. But I think that decision was 100% the right one. It's a little weird the first time you have to write it out, and in fact it might continue to be weird, but in exchange you are much less likely to accidentally type the wrong thing, and people are much more likely to be able to read your code without being misled by it.\r\n\r\nI think exactly the same argument applies here.\r\n"}}
{"actor":{"display_login":"bakkot"}}