proposal-private-fields
proposal-type-annotations
Our great sponsors
proposal-private-fields | proposal-type-annotations | |
---|---|---|
7 | 101 | |
320 | 4,086 | |
- | 2.3% | |
0.0 | 4.7 | |
over 2 years ago | about 1 month ago | |
HTML | JavaScript | |
- | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
proposal-private-fields
- What do you mean by “encapsulation” / “hard private”?
-
All JavaScript and TypeScript features of the last 3 years explained
> - # private... not sure why they didn't just use the "private" keyword, but I don't care. I almost always use TypeScript anyways
One of the reasons was to allow private and public fields of the same name, so that subclasses are free to add own public fields without accidentally discovering private fields. 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 2015 at the time private fields were being designed: https://github.com/tc39/proposal-private-fields/issues/14.
-
why java developers always hate Node/javascript? why they don't face the truth that javascript now is not javascript year 1995?
The inability to correctly polyfill this, which still keeping the variables private, was a subject of debate in TC39. One of the explicit advantages of moving to a "soft private" model (as discussed here: https://github.com/tc39/proposal-private-fields/issues/33) was that it could be polyfilled correctly.
- Is TypeScript inevitable future of webdev or will it die out some day?
-
Do decorators have a future?
There was a long and thoughtful article explaining why the private keyword was not enough; but now I can't find it :-( Here's the best replacement I could find: https://github.com/tc39/proposal-private-fields/issues/14 Effectively, what they are saying, is that you need to be able, within a class method, to disambiguate whether you are dealing with a private field of an identically named public field, and the keyword doesn't help with this.
-
Implementing Private Fields for JavaScript
This is all covered here:
https://github.com/tc39/proposal-private-fields/blob/master/...
-
Implementing Private Fields for JavaScript – Mozilla Hacks - the Web developer blog
As well, the Issues section of that proposal repo, as well as the Issues section of the original Private Fields repo (before it was merged with the Class Fields proposal) contain lots of discussion about this topic.
proposal-type-annotations
-
Bun 1.1
That proposal is not fully compatible with Typescript: https://github.com/tc39/proposal-type-annotations?tab=readme...
-
Go 1.22 Release Notes
They held a meeting a few months ago so it's alive but probably still years away.
https://github.com/tc39/proposal-type-annotations/issues/184
-
[AskJS] Kicking a dead horse - TS vs JS
I particularly like this thread in the TC39 types proposal. TypeScript IS a development trojan horse and locks you into the Microsoft Way of being a JS developer.
- Strong static typing, a hill I'm willing to die on...
-
HTML First – Six principles for building simple, maintainable, web software
Edit: There is a proposal to extend JavaScript with type annotations, which would allow ("a reasonably large subset") of TypeScript to run directly in the browser. Yay!
https://github.com/tc39/proposal-type-annotations
-
Building React Components Using Unions in TypeScript
More importantly, TypeScript typically commits to build things into itself when the proposal in JavaScript reaches Stage 3. The pattern matching proposal in JavaScript is Stage 1, but depends on many other proposals as well that may or may not need to be at Stage 3 as well for it to work. This particular proposal is interested on pattern matching on JavaScript Objects and other primitives, just like Python does with it’s native primitives. These are also dynamic types which helps in some areas, but makes it harder than others. Additionally, the JavaScript type annotations proposal needs to possibly account for this. So it’s going to be awhile. Like many years.
-
Show HN: Conway's Game of Life in TypeScript's type system
this is exactly what I want from the _Types as Comments_ proposal[0] as I think it's the only way that types can feasibly become part of the language. It's hard to imagine how all of the concepts TS introduces via special syntax can be covered otherwise.
[0] https://tc39.es/proposal-type-annotations
-
Why Htmx Does Not Have a Build Step
Crossing my fingers that the proposal for allowing (browser-ignored) type annotations in javascript progresses: https://tc39.es/proposal-type-annotations/
Between that, HTTP2/3 and ES modules many of the downsides for building apps with no compile step are almost completely mitigated.
-
TypeScript Without Transpilation
JSDoc can get you pretty far, but it can be clumsy sometimes. There’s a [TC39 proposal](https://github.com/tc39/proposal-type-annotations) to allow types to live in JS code and be treated as comments (similar with Python types today)
- Do you think typescript will ever have native support on brosers? Or we will have only the JS type annotations?
What are some alternatives?
proposal-class-fields - Orthogonally-informed combination of public and private fields proposals
astexplorer - A web tool to explore the ASTs generated by various parsers.
Scala.js - Scala.js, the Scala to JavaScript compiler
rescript-compiler - The compiler for ReScript.
Carp - A statically typed lisp, without a GC, for real-time applications.
d2-playground - An online runner to play, learn, and create with D2, the modern diagram scripting language that turns text to diagrams.
proposal-record-tuple - ECMAScript proposal for the Record and Tuple value types. | Stage 2: it will change!
deno - A modern runtime for JavaScript and TypeScript.
assemblyscript - A TypeScript-like language for WebAssembly.
captureSystemAudio - Capture system audio ("What-U-Hear")
proposal-regexp-v-flag - UTS18 set notation in regular expressions
proposals - Tracking ECMAScript Proposals