Chrome 72 Beta: Public class fields, user activation and more
blog.chromium.org
blog.chromium.org
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.mdI expect that TypeScript will adopt this proposal given that some of the people working on and defending the proposal seem to be part of the TypeScript team.
> Refactoring and index-access notation become awkward with it.
Given that other languages have similar solutions and this actually has more information in the source file, I assume that refactoring will become quicker and index-access will just move to private maps. Adding arbitrary fields at runtime and dynamic access to private fields are both tools with limited value compared to the potential for introducing subtle bugs.
TIL I'm not a serious developer. I actually think compiling Javascript is a huge barrier to entry to would be devs. I think a development experience of put the code on the page and it runs is a lot better than configuring npm/gulp/grunt.
But if you're writing complex business logic, trying to build pipelines of client-side data whose derivations are fed into a myriad of components, and you'll want things like type constraints, module hierarchies, compiler support for things like JSX to simplify the cognitive load of understanding what a thing-that-outputs-HTML-like-stuff does.
At the end of the day, compiler setup is O(1), and code complexity is at least Ω(N) in how difficult it becomes to understand a codebase. It's worth doing anything you can with the compiler to reduce complexity in large codebases.
I also think you right. Compilers don't always go well with programming inductees. This is why Python and Ruby are so popular as introductory courses. But this is why I think Javascript has done so well because it doesn't _need_ compiling, which is great for new-comers. When things level up and get complicated, enter JS compilers. It's a 'best of both worlds' sort of thing.
The problem is that this breaks down immediately for a million different reasons at any kind of scale with multiple developers, complex dependency graphs, and the need for automated testing. The tooling exists to solve real problems whether you've experienced them or not.
The point is using it as universal bytecode for deploying anything you want. Ideally we could do front end web development with any language/framework combo and just compile to WASM. It seems like that's the future, with things like Blazor getting major support, and that JS will probably mostly die out over the next 5 years.
As a TypeScript-user, I hadn't really realized this wasn't just plain, regular Ecmascript yet and thus assumed it had to be something else.
So I had to read the blog-post to see what it was, and find out that I no longer know regular Javascript ;)
The folks who did ES6 upgrade & TypeScript improvements can't be thanked enough.
I suppose the main difference is that in JS the implementation semantics of classes are defined and can be prodded at. Is that really so different though? I think it's just a bit strong to say ES classes "don't exist" because the methods by which they operate can be observed at a lower level.
Exactly, and `.prototype` is just a runtime and programmable vtable. You copy (by reference) everything from the base prototype and replace (override) every member that you need to. You can even call overridden methods with `BaseType.prototype.foo.call(this, ...)`.
With any luck we'll have so completely abstracted over it by ES12 that it won't even need to be mentioned in the spec.
Proposal - https://github.com/tc39/proposal-class-fields
Firefox Implementation Tracker - https://bugzilla.mozilla.org/show_bug.cgi?id=1499448
Safari Implementation Tracker - https://bugs.webkit.org/show_bug.cgi?id=174212
The others are largely security updates which honestly I'm fine with browsers pushing ahead with. The User activation query API stuff is great and is gonna solve a lot of headaches around misbehaving sites. Safari already has a rudimentary implementation around this with autoplay as well, so this is an effort to standardise some existing "monoculture bullshit".
As far as depreciating TLS 1 and 1.1, I don't think there's anyone out there arguing that that isn't a good idea.
I said such in the mailing list for the framebusting change to require activation.