{"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":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":121,"created_at":"2018-05-07T19:25:26Z","updated_at":"2018-06-29T16:07:19Z","closed_at":null,"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-fields/issues/14\">Why not use the \"private\" keyword, like Java or C#?</a></td>\r\n            <td>106</td>\r\n            <td>7</td>\r\n            <td>8</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/14#issuecomment-216042553\">Why not use the \"private\" keyword, like Java or C#?</a> 💬</td>\r\n            <td>119</td>\r\n            <td>0</td>\r\n            <td>13</td>\r\n            <td>5</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>40</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-private-methods/issues/10\">Stop this proposal</a></td>\r\n            <td>99</td>\r\n            <td>15</td>\r\n            <td>6</td>\r\n            <td>19</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>28</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>28</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>17</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/56\">Proposal: keyword to replace `#` sigil</a></td>\r\n            <td>15</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-private-methods/issues/8\">Why not use private keyword instead of #?</a></td>\r\n            <td>14</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-private-methods/issues/28\">Yet another approach to a more JS-like syntax</a></td>\r\n            <td>5</td>\r\n            <td>0</td>\r\n            <td>0</td>\r\n            <td>26</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        <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>3</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/zenparsing/js-classes-1.1/issues/40\">Explore a more JS-like syntax</a></td>\r\n            <td>6</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 *very* 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/401400626","html_url":"https://github.com/tc39/proposal-class-fields/issues/100#issuecomment-401400626","issue_url":"https://api.github.com/repos/tc39/proposal-class-fields/issues/100","id":401400626,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTQwMDYyNg==","user":{"login":"bdistin","id":18535830,"node_id":"MDQ6VXNlcjE4NTM1ODMw","avatar_url":"https://avatars2.githubusercontent.com/u/18535830?v=4","gravatar_id":"","url":"https://api.github.com/users/bdistin","html_url":"https://github.com/bdistin","followers_url":"https://api.github.com/users/bdistin/followers","following_url":"https://api.github.com/users/bdistin/following{/other_user}","gists_url":"https://api.github.com/users/bdistin/gists{/gist_id}","starred_url":"https://api.github.com/users/bdistin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdistin/subscriptions","organizations_url":"https://api.github.com/users/bdistin/orgs","repos_url":"https://api.github.com/users/bdistin/repos","events_url":"https://api.github.com/users/bdistin/events{/privacy}","received_events_url":"https://api.github.com/users/bdistin/received_events","type":"User","site_admin":false},"created_at":"2018-06-29T16:07:19Z","updated_at":"2018-06-29T16:07:19Z","author_association":"NONE","body":"@mbrowne I too am concerned about overuse of private, given the absence of less restrictive access modifiers. But I am far more concerned with the lack of consistency between # Sigil, current JS paradigms, and future paradigms (such as protected/hidden/soft private). Nothing would be worse than ending up with:\r\n\r\n```js\r\nclass Demo {\r\n    x = 0; // a public x\r\n    softPrivate x = 1; // a softPrivate x\r\n    protected x = 2; // a protected x\r\n    hidden x = 3; // a hidden x\r\n    #x = 4; // looks like a public #x, but is really private x\r\n    \r\n    foo() {\r\n       console.log(this.x, softPrivate.x, protected.x, hidden.x, this.#x);\r\n       console.log(this['x'], softPrivate['x'], protected['x'], hidden['x'], 'I cannot access the private x dynamically because the # Sigil makes private accessors the blacksheep of all class accessors and javascript as a whole');\r\n    }\r\n}\r\n```\r\n\r\nEspecially because it's easily solved by using the private keyword:\r\n```js\r\nclass Demo {\r\n    x = 0; // a public x\r\n    softPrivate x = 1; // a softPrivate x\r\n    protected x = 2; // a protected x\r\n    hidden x = 3; // a hidden x\r\n    private x = 4; // very clearly a private x\r\n    \r\n    foo() {\r\n       console.log(this.x, softPrivate.x, protected.x, hidden.x, private.x);\r\n       console.log(this['x'], softPrivate['x'], protected['x'], hidden['x'], private['x']); // Woohoo, works!\r\n    }\r\n}\r\n```\r\n\r\nI agree that an official proposal should be written, but that proposal should include private as part of it's consistent syntax, instead of forcing private in with class fields and being stuck with it's inconsistent, unintuitive, and feature gimped form it is currently in."}}
{"actor":{"display_login":"bdistin"}}