Hacker GitHub

← All repos

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

Mentions per year 39 mentions · busiest year 2018 (20)
20082026
  1. ▲ 1
    Field declarations overwrite properties on the prototype
    story by Lwrless · 2023-05-30 · 1 comment
  2. ▲ 1
    Turning “hard private” into “soft private”
    story by benatkin · 2023-05-11 · 1 comment
  3. …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…
  4. …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…
  5. My bad, I meant class fields which are stage 3: https://github.com/tc39/proposal-class-fields https://tc39.es/proposal-class-fields/
  6. …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
  7. …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
  8. …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
  9. 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
  10. …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
  11. …oogle.com/web/updates/2018/03/smooshgate For something more recent and ongoing, private class fields: https://github.com/tc39/proposal-class-fields
  12. …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
  13. 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
  14. 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
  15. …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
  16. …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…
  17. …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
  18. @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
  19. …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
  20. …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
  21. …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
  22. …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
  23. …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
  24. …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
  25. …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
  26. …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
  27. …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
  28. https://github.com/tc39/proposal-class-fields/blob/master/PR...
    comment by kevincennis · 2018-12-18 · in V8 release v7.2
  29. …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
  30. …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
  31. 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
  32. 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
  33. …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
  34. ▲ 1
    Private fields in JavaScript
    story by cztomsik · 2018-07-11 · 0 comments
  35. …in the constructor, and since it's an arrow function it captures the correct context. See https://github.com/tc39/proposal-class-fields .
  36. …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
  37. …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
  38. …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...
  39. ▲ 36
    JavaScript TC39 implementing hashmark private class fields
    story by just_astounded · 2017-08-03 · 76 comments