tc39/proposal-class-fields
View on GitHub ↗ ★ 1,726 HTML archived
Orthogonally-informed combination of public and private fields proposals
39 mentions on Hacker News by 32 people: 4 stories, 35 comments · first 2017-08-03 · latest 2023-05-30
20082026
-
…private fields of superclasses. There were many more considerations that went into the design: https://github.com/tc39/proposal-class-fields/blob/main/PRIV... . There was a heated debate about this and the choice of the # sigil back in…
comment by stasm · 2023-03-09 · in JavaScript and TypeScript features of the last 3 years -
…from being a public field named x, so accessing a private field can't just be a normal lookup. https://github.com/tc39/proposal-class-fields/blob/main/PRIV... Combined with this: > Why aren't declarations private x? > This sort of…
comment by kipple · 2023-03-09 · in JavaScript and TypeScript features of the last 3 years -
My bad, I meant class fields which are stage 3: https://github.com/tc39/proposal-class-fields https://tc39.es/proposal-class-fields/
comment by pier25 · 2019-12-22 · in ECMAScript proposal: String.prototype.replaceAll -
…full steam ahead. EDIT: some discussions are unlocked (see below for a decent argument summary). https://github.com/tc39/proposal-class-fields/issues/150 Decorators, pipe operators, tuples, immutable records, and slice notation are all…
comment by hajile · 2019-12-09 · in A brief look at async-await -
…to this [1] to be particularly compelling. This actually seems like the right solution to me. [1] https://github.com/tc39/proposal-class-fields/blob/master/PR...
comment by wtetzner · 2019-01-22 · in What's New in JavaScript for 2019 -
…now. It'll be a small but useful addition in some situations, and it's scope is extremely limited. https://github.com/tc39/proposal-class-fields/blob/master/PR...
comment by Klathmon · 2019-01-22 · in What's New in JavaScript for 2019 -
Here's the FAQ on the private syntax: https://github.com/tc39/proposal-class-fields/blob/master/PR...
comment by reverentgeek · 2019-01-22 · in What's New in JavaScript for 2019 -
…runtime, only the typechecker, so their `private` isn't really private outside of TypeScript. [1] https://github.com/tc39/proposal-class-fields/blob/master/PR...
comment by Klathmon · 2019-01-22 · in What's New in JavaScript for 2019 -
…oogle.com/web/updates/2018/03/smooshgate For something more recent and ongoing, private class fields: https://github.com/tc39/proposal-class-fields
comment by otras · 2019-01-07 · in Ask HN: What are the most interesting things happening right now in JavaScript? -
…https://reactjs.org/docs/jsx-in-depth.html [2] https://reactjs.org/docs/react-without-jsx.html [3] https://github.com/tc39/proposal-class-fields [4] https://github.com/elmsln/lrnwebcomponents/blob/master/eleme...
comment by dmitriid · 2019-01-07 · in ES6 Classes -
The `y = 10;` is a class field, which is part of a Stage 3 proposal, https://github.com/tc39/proposal-class-fields . It’s not yet finalised, though it’s getting there. No current browser supports it, and those that write their code thus…
comment by chrismorgan · 2019-01-07 · in ES6 Classes -
Sure, but this is being addressed in: https://github.com/tc39/proposal-class-fields And available now as: https://babeljs.io/docs/en/babel-plugin-proposal-class-prope...
comment by gedy · 2019-01-06 · in ES6 Classes -
…https://news.ycombinator.com/item?id=18707421 1: https://news.ycombinator.com/item?id=18706363 2: https://github.com/tc39/proposal-class-fields/blob/master/PR... 3: https://github.com/tc39/proposal-class-fields/blob/master/PR...
comment by __ryan__ · 2018-12-19 · in V8 release v7.2 -
…the Public Class Fields proposal, which has positive public signals from other browsers: Proposal - https://github.com/tc39/proposal-class-fields Firefox Implementation Tracker - https://bugzilla.mozilla.org/show_bug.cgi?id=1499448 Safari…
comment by jjcm · 2018-12-19 · in Chrome 72 Beta: Public class fields, user activation and more -
…awkward with it. Anecdotally, the vast majority of serious developers I know transpile to JS. [1]: https://github.com/tc39/proposal-class-fields/issues/177 [2]: https://github.com/tc39/proposal-class-fields/blob/master/PRIVATE_SYNTAX_FAQ.md
comment by wakeywakeywakey · 2018-12-18 · in Chrome 72 Beta: Public class fields, user activation and more -
@gaardani that clearly will work, as evidenced here https://github.com/tc39/proposal-class-fields/issues/100#iss...
comment by ricardobeat · 2018-12-18 · in V8 release v7.2 -
…will act the same as it does now, it will always refer to the public property of that name. https://github.com/tc39/proposal-class-fields/blob/master/PR...
comment by Klathmon · 2018-12-18 · in V8 release v7.2 -
…excessive. (And linguistically inconsistent with the choice of non-hard-privacy for symbols.) [1]: https://github.com/tc39/proposal-class-fields/issues/177#iss...
comment by JeremyBanks · 2018-12-18 · in V8 release v7.2 -
…will be just a huge annoyance. #33 : https://github.com/tc39/proposal-private-fields/issues/33 2 : https://github.com/tc39/proposal-class-fields/blob/master/PR... 3 : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... 4 :…
comment by drinchev · 2018-12-18 · in V8 release v7.2 -
…stopping this proposal. IMHO "No solution" would be better than "bad solution" in this case. 1 : https://github.com/tc39/proposal-class-fields/issues/100
comment by drinchev · 2018-12-18 · in V8 release v7.2 -
…a private interface and wouldn't need to be documented or maintained across versions. [0] https://github.com/tc39/proposal-class-fields/blob/master/PR...
comment by Klathmon · 2018-12-18 · in V8 release v7.2 -
…I most likely won't be using them, I reluctantly support them being added to the language. [0] https://github.com/tc39/proposal-class-fields/blob/master/PR...
comment by Klathmon · 2018-12-18 · in V8 release v7.2 -
…fields needs to be improved, then go to JS Committee's GitHub Issues and give feedback about it: https://github.com/tc39/proposal-class-fields/issues There's at least three specifically about the #: https://github.com/tc39/proposal-class-fi…
comment by gardaani · 2018-12-18 · in V8 release v7.2 -
…also performance concerns to changing the lookup logic without the sigil. More info in the link. 0: https://github.com/tc39/proposal-class-fields/blob/master/PR...
comment by __ryan__ · 2018-12-18 · in V8 release v7.2 -
…here a few days ago. There has been a lot of discussion regarding public and private keywords here: https://github.com/tc39/proposal-class-fields/blob/master/PR...
comment by sjroot · 2018-12-18 · in V8 release v7.2 -
https://github.com/tc39/proposal-class-fields/blob/master/PR...
comment by kevincennis · 2018-12-18 · in V8 release v7.2 -
…detect or affect the existence, name, or value of any private field of instances of said class.." https://github.com/tc39/proposal-class-fields/blob/master/PR...
comment by lioeters · 2018-12-14 · in Public and private class fields -
…shipped on by default. There still may be spec changes between a stage 3 and stage 4 proposal. [0]: https://github.com/tc39/proposal-class-fields [1]: https://tc39.github.io/process-document/
comment by danShumway · 2018-12-13 · in Public and private class fields -
Here's the issue where dropping '#' syntax is being discussed: https://github.com/tc39/proposal-class-fields/issues/177
comment by drzaiusx11 · 2018-12-13 · in Public and private class fields -
The article links to the explanation by the proposal champions: https://github.com/tc39/proposal-class-fields/blob/master/PR...
comment by mathias · 2018-12-13 · in Public and private class fields -
…the article says that they are proposals—is there any way to provide feedback on this? (Edit: https://github.com/tc39/proposal-class-fields/blob/master/PR... ) [1] https://www.typescriptlang.org/docs/handbook/classes.html
comment by sjroot · 2018-12-13 · in Public and private class fields -
…in the constructor, and since it's an arrow function it captures the correct context. See https://github.com/tc39/proposal-class-fields .
comment by bramen · 2017-11-19 · in When I use classes, when I don’t, what I do instead and why -
…is our colleagues at Facebook worked on the class fields proposal that addresses this elegantly :-) https://github.com/tc39/proposal-class-fields Changes to the language take time, but then they benefit everyone and not just a particular…
comment by danabramov · 2017-09-29 · in New React website -
…flowtype (I think you can), but you might be able to if you enable babel with stage-3 features: https://github.com/tc39/proposal-class-fields You don't actually need this fancy class syntax anyway. You can just define a class and then do:…
comment by a_humean · 2017-08-31 · in Announcing Rust 1.20 -
…as a battle tested solution that fits the existing convention set by the "static" modifier. --- [1] https://github.com/tc39/proposal-class-fields/issues/15#issu...
comment by bcherny · 2017-08-03 · in JavaScript TC39 implementing hashmark private class fields