Completely unrelated to the video topic, but I want to say to Theo if you're reading this, I'm really glad the shift to a more open sponsorship policy has seemingly worked out for you. Sure, I liked the mostly no-ads approach to your older videos, but I respect the work you put into making these sponsorships not only work into the video, but often remaining relevant to your audience. Haven't made it more than 60 seconds into the video, but I just wanted to say as a relatively new viewer that I appreciate the work you do. Keep it up my dude!
@Theo I believe stage 2.7 is not "spec not ready, but feel free to implement". It is "spec is ready, but the tests are not done yet. Implementation is risky"
I really like the `import defer *`, this is such a good idea. I remember always contemplating which way would perform better because of network waterfalls being just as big of a pain as heavy initialization
@17:00 -- just learn how to manage your own freaking scope. I hate the cycle of 'asynchronous hard, make look like synchronous with async / await' --> new devs learn less as details are glossed over --> 'what even is scope management??' --> new features to hide scope management, like closures --> 'what even is scope?!?!' --> new features to make devs need to think even less. Stop providing features that make it so people don't learn, ffs.
I was baffled seeing the example they gave. If they think devs find it difficult to understand that calling an async fn in a sync context won't block, then good luck teaching them their proposed solution.
As a Leetcode guy who solves problems with JS, we want Stack , Queue, Dequeue, Heap, TreeMap, TreeSet in the language by default as JS has a huge community
Basically you have a "function" (or a secret method of some particular protocol a class implements) operate on a value just before it's assigned to the current scope. Which normally is not so useful (since you could do `let variable = somefn(value)`), but in function arguments and destructuring is kind of cool, but a bit niche. But other than that the rest is just specifics/details. Actually, there's discussion about whether this would essentially enable runtime type checking, e.g. function add(Number(x), Number(y)) { return x + y }, assuming here Number has that secret method implemented to do the validation before destructuring.
The vid is full of inaccuracies. As someone who follows the TC39 process closely, I can assure that. The research feels too rushed and doesn’t do most of the proposals justice. As such is likely to mislead people of the real problems being solved. Also, I feel like the more thorough review would’ve elicited more scepticism for the many of the proposals, which is always more entertaining to watch :).
@@alexandermason4229 If Theo wants to please his audience, by presenting shorter videos with less content - that's ok. But doing a shorter video with the same amount of content doesn't work. If you're in it for the views, you can make shorts. Content shouldn't suffer.
@@alexandermason4229 I don't think anyone would mind a long content if said content is at appropriated length such as this. There's reason why some people are pissed on PrimeAgent making 50 minutes video out of 15 minutes clip.
@@Colwc His content were longer than it needed to be. I don't have time for 20+ min videos every day so i like that he's trying to cut them down in length
I hope they don't mess up the import syntax anymore and just use the import attributes that were created for exactly that reason, like import foo from 'bar' with { source: true } import foo from 'bar' with { defer: true } Instead of "import source" or "import defer"
I love it! More learning! Wooo! Haha jk, keeps me young. @Theo can you make a video that covers the possible implications of having native JS support an enum keyword as well as TS files? You touched on it in the the video and you seemed to have more to say. Thanks for all your hard work! Your content is awesome!
🥺... this seems really good for the JS ecosystem... ADT types, Enums, Options to handle errors, pattern matching, zips, maps, monadic patterns to parallelize operations... and a lot of FP stuffs, would be great for all levels of the JS lang, devs should love this even if they just use Options and Enums (adt types)... hope to be able to play these characteristics. . . . . it just rn .. i feels really 😞htf this whole...
Video title: big changes coming. Content: most functions can be written in utils by devs to be reused in project. Since there are so many browser engines, who may or may not implement these. Relying on your own implementation or a utils library is better.
10:19 damn Js have this method proposed now, i remember in college i was so happy when i could do it in PHP and just iterate on front end and have perfect grid
I’ll be waiting for the day moving functions to the timeout queue inside a promise with a timeout of 0 is replaced with an actual parallelism implementation
@@PaulSebastianM Of course, they didn't imply otherwise... What the timeout queue does enable: 'yielding' to the browser to prevent blocking the main thread if/when doing lots of work.
@@PaulSebastianM actually, it moves it off the sync main thread, nothing else or more Not real parallelism cause that’s not real in JS. That’s why you wrap a promise. This usually makes it so that they are deferred and if not awaited, these threads handle at the end of function as well, but in order.
@@PaulSebastianM this kind of things is useful if you say; make a for loop that pushes to a promise bucket to await all of, And you don’t want any sync gen code being ran until ready (by undeferring)
It would be so cool if js was less messy (JS0?), then we could have insane optimizations for running at near-native speeds (and near-interpreted latencies!)
Promise.try=f=>(async()=>f())(); Seems a little much to go through TC39 to replace one line shim. For that matter, compare these equivalent expressions: Promise.try(f).then(...); (async()=>f())().then(...); The finished product reduces your code length by TWO characters. Totally worth shoving through a JS proposal, eh? Oh, you prefer the semantics of the first? It's super easy, barely an inconvenience to do the second expression, and not hard at all to see what it's doing. I've used this pattern for years. This also works for promise-or-value variables: (async()=>x)().then(...); While the Promise.try is actually 4 characters LONGER in this case, and puts an extra function call on the stack: Promise.try(()=>x).then(...); Some of these proposals are both useful and necessarily in the engine. Others should have been a module import at most.
7:14 - not a fan of putting functions on side of the creation of the variables. Allow .then() on everything not just observables or could make .destruct() that basically works the same on any of destructible things.
I really wanted array zip for a while, happy to see it's moving up. Not sold on the destructuring transformers syntax, it looks super weird to me to wrap things in what looks like a function call on the left side of the = sign. Also iterator methods. Might finally start using those. iterators/generators are a cool concept but it's hard to work with when they're missing features from arrays. Still waiting for custom operator overloading though. I wouldn't use it too often but sometimes writing thing1 + thing2 just makes so much sense. JS is the only language I use that doesn't have it. Maybe next time.
I don't know if the power of operator overloading should be trusted to JS devs.. But hey it's always fun to throw stuff and see what happens 😹 Or maybe it's just me that the only place I saw it was in C++ and already an incomprehensible mess sometimes If it only applied to the same class instances I guess it could not be that bad
@@ivlis.w I've used it successfully in Rust and C#, and it's also available in python. So lots of high and low level languages do it, why not JS. I think ideally you'd use it with [Symbol.add]: (value1, value2)=>{...}, seems reasonable. Could even be used on plain objects
Extractor pattern is bull, not usable, because it is more symbols to type and very hard to understand. const should be followed by the name, not function call.
You can disable individual yapping sections and tools that makes it yap more. You can also customize prompts and ask it to yap less. Or to swear like a pirate or something.
I feel more reluctant to program and learn javascript, like php, every time javascript decides to add things that could be done before with new sintaxis and keep supporting previous features. It's like watching c++1993 compared to modern C++, but 30 times worse.
Did something change? It’s always been like that, so I was wondering if you heard that somehow they figured out how to reverse the implement->use process to a use->implement process.
Dear TC39 homies, I humbly request that you let me hijack styling, button text and callbacks on each button from the browser default alert() and confirm() methods signed, jesusTakeTheWheel™
There is a new model of llama 3.1 neurotron from NVIDIA appeared a few days ago, that should be more powerful than 4o from chat gpt. Will you make a video on that?
It’s funny seeing people complaining about this at the same time as people complaining javascript doesnt have all the syntaxes / std library features they wish it did (I’m not saying anything about who’s right or wrong though, just appreciating the irony of the fact)
@@b_two haha, I got the exact same feeling, keep watching people who either have to code with js everyday or people who just barely code anything for the web complaining the both side. I was too busy to tackle problems, the only thing I more care about it's just the consistency, javascript is infamous for its inconsistency of builtin functionalities in the past. And I'm suffer a lot from it and have to create lots of functions that mimic the std lib from other languages that are supposed to be the behavior of some of current functions. It seems like I rarely see people talking about it except the date lib, and finally they address it.
Poor Theo. Here, take this and save it, have a relief until native chunks come. const chunkify = (arr, size) => { const result = [] let index = 0 while(index < arr.length){ result.push(arr.slice(index, index + size)) index += size } return result }
It is ironic that you're making fun of how simple it is to implement, while also simultaneously implementing it wrong? The one in the video operates on streams, not arrays, meaning you can chunk data without first reading it all into memory. Your example will read everything into memory first and then create new slices from it.
Im sorry but i hate this. The only purpose for such a feature creep is to make it impossible to create competitors to the established browsers, specs should be simple and minimal, if you can implement it in JS there is no need for a standardization of the feature. You are killing the free and open internet with feature creep. You will make it impossible to implement a browser by a small dedicated team...
13:18 just .isError? Why not .is generally? They’re not thinking far enough. isDate, isUrl, isMyClassName etc. Nobody contributing thought of extending the concept further? 😳
The difference is it's going to be optimized for you at a deeper level. On top of that, rather than copy pasting an implementation, even 2 lines, from project to project, anyone would be happier with it being a language feature. Why would you not want that to be a feature? In C#, Linq is literally every dev's favorite built-in library, and all it contains is a bunch of functional helper functions for data handling. A better standard makes for a better language.
@@Exilum That's not a real comparison at all because Linq does a lot in terms of performance and when it comes to using something like Entity Framework, things like defining the conditions for a query is only possible as native comparisons because Linq can be used to translate them into actual queries at runtime. That said, things like chunking or stream and array operators in general should generally be part of the standard library so I'm not mad about that. But Theo will always exaggerate things like this like "ohhh this would make X and Y so much easier I had to struggle with A, B, C" is basically a speech pattern for him. It's a streamer thing, I think.
All languages eventually become Rust because on a long enough timeline everything evolves into crab. 🦀
Bruh this is the exact same comments on the struct video
Thankfully not C
Many languages could add sum-types.
@@lalithrockz 100% a bot, this comment will be some weird ai tool or a crypto scam in a few days
All roads lead to C
Lot of cool stuff, just wish the pipeline operator hadn't been stalled for the past like 3 years
Yeah, this is something that would make chaining much more readable and upgrade the language so much, IMO.
but we got reverse ahh function calls with destructuring 💀
Completely unrelated to the video topic, but I want to say to Theo if you're reading this, I'm really glad the shift to a more open sponsorship policy has seemingly worked out for you. Sure, I liked the mostly no-ads approach to your older videos, but I respect the work you put into making these sponsorships not only work into the video, but often remaining relevant to your audience. Haven't made it more than 60 seconds into the video, but I just wanted to say as a relatively new viewer that I appreciate the work you do. Keep it up my dude!
@Theo I believe stage 2.7 is not "spec not ready, but feel free to implement". It is "spec is ready, but the tests are not done yet. Implementation is risky"
I really like the `import defer *`, this is such a good idea.
I remember always contemplating which way would perform better because of network waterfalls being just as big of a pain as heavy initialization
@17:00 -- just learn how to manage your own freaking scope. I hate the cycle of 'asynchronous hard, make look like synchronous with async / await' --> new devs learn less as details are glossed over --> 'what even is scope management??' --> new features to hide scope management, like closures --> 'what even is scope?!?!' --> new features to make devs need to think even less. Stop providing features that make it so people don't learn, ffs.
I was baffled seeing the example they gave. If they think devs find it difficult to understand that calling an async fn in a sync context won't block, then good luck teaching them their proposed solution.
As a Leetcode guy who solves problems with JS, we want Stack , Queue, Dequeue, Heap, TreeMap, TreeSet in the language by default as JS has a huge community
I don't understand the Extractor thing at all
Looks so damn confusing. Some features are simply not necessary and encourages writing worse code. Why does it seem like this would be one of those.
Basically you have a "function" (or a secret method of some particular protocol a class implements) operate on a value just before it's assigned to the current scope. Which normally is not so useful (since you could do `let variable = somefn(value)`), but in function arguments and destructuring is kind of cool, but a bit niche. But other than that the rest is just specifics/details.
Actually, there's discussion about whether this would essentially enable runtime type checking, e.g. function add(Number(x), Number(y)) { return x + y }, assuming here Number has that secret method implemented to do the validation before destructuring.
The vid is full of inaccuracies. As someone who follows the TC39 process closely, I can assure that.
The research feels too rushed and doesn’t do most of the proposals justice. As such is likely to mislead people of the real problems being solved.
Also, I feel like the more thorough review would’ve elicited more scepticism for the many of the proposals, which is always more entertaining to watch :).
Yessss,
So much jumping, and skipping.
It feels like an abstract of a crash-course 😂😂
@@alexandermason4229 If Theo wants to please his audience, by presenting shorter videos with less content - that's ok. But doing a shorter video with the same amount of content doesn't work. If you're in it for the views, you can make shorts. Content shouldn't suffer.
Do you have a few examples of these inaccuracies?
@@alexandermason4229 I don't think anyone would mind a long content if said content is at appropriated length such as this.
There's reason why some people are pissed on PrimeAgent making 50 minutes video out of 15 minutes clip.
@@Colwc His content were longer than it needed to be. I don't have time for 20+ min videos every day so i like that he's trying to cut them down in length
This is like the 10th video where Javascript changes forever. I can't keep up.
Welcome to the last 16 years 😂
I hope they don't mess up the import syntax anymore and just use the import attributes that were created for exactly that reason, like
import foo from 'bar' with { source: true }
import foo from 'bar' with { defer: true }
Instead of "import source" or "import defer"
or maybe { type: "source" }?
I love it! More learning! Wooo! Haha jk, keeps me young. @Theo can you make a video that covers the possible implications of having native JS support an enum keyword as well as TS files? You touched on it in the the video and you seemed to have more to say. Thanks for all your hard work! Your content is awesome!
They call it JavaScript, but with these new features we have to rename it to RustScript
Probably has to be CrabScript due copyright, trademark, and CoC issues.
there are good concepts in rust and other languages that would also suit javascript well. Pattern matching for example
🥺... this seems really good for the JS ecosystem... ADT types, Enums, Options to handle errors, pattern matching, zips, maps, monadic patterns to parallelize operations... and a lot of FP stuffs, would be great for all levels of the JS lang, devs should love this even if they just use Options and Enums (adt types)... hope to be able to play these characteristics.
.
.
.
.
it just rn .. i feels really 😞htf this whole...
decimals are huge!
I really like the idea behind asyncVar but the syntax...
Video title: big changes coming.
Content: most functions can be written in utils by devs to be reused in project.
Since there are so many browser engines, who may or may not implement these. Relying on your own implementation or a utils library is better.
❤
yes but we still dont have pattern matching and pipes😥
10:19 damn Js have this method proposed now, i remember in college i was so happy when i could do it in PHP and just iterate on front end and have perfect grid
The array zip one is dope.
I’ll be waiting for the day moving functions to the timeout queue inside a promise with a timeout of 0 is replaced with an actual parallelism implementation
Moving CPU bound code to the "timeout queue", as you call it, does not make JS run it immediately nor can it ever run such code in parallel.
@@PaulSebastianM Of course, they didn't imply otherwise... What the timeout queue does enable: 'yielding' to the browser to prevent blocking the main thread if/when doing lots of work.
@@PaulSebastianM actually, it moves it off the sync main thread, nothing else or more
Not real parallelism cause that’s not real in JS.
That’s why you wrap a promise.
This usually makes it so that they are deferred and if not awaited, these threads handle at the end of function as well, but in order.
@@PaulSebastianM this kind of things is useful if you say; make a for loop that pushes to a promise bucket to await all of, And you don’t want any sync gen code being ran until ready (by undeferring)
Hey Theo, can you make a video about Effect? I'm thinking of using it for a project but I get a lot of mixed feedback. What's your take?
It would be so cool if js was less messy (JS0?), then we could have insane optimizations for running at near-native speeds (and near-interpreted latencies!)
Promise.try=f=>(async()=>f())();
Seems a little much to go through TC39 to replace one line shim.
For that matter, compare these equivalent expressions:
Promise.try(f).then(...);
(async()=>f())().then(...);
The finished product reduces your code length by TWO characters. Totally worth shoving through a JS proposal, eh?
Oh, you prefer the semantics of the first? It's super easy, barely an inconvenience to do the second expression, and not hard at all to see what it's doing. I've used this pattern for years.
This also works for promise-or-value variables:
(async()=>x)().then(...);
While the Promise.try is actually 4 characters LONGER in this case, and puts an extra function call on the stack:
Promise.try(()=>x).then(...);
Some of these proposals are both useful and necessarily in the engine. Others should have been a module import at most.
The "import source" would be perfect for native modules (.node, .dll, etc) and would make bundling them easy-peasy.
Temporal will be huge. I don't mind if it takes a while so they get everything right.
I most indeedly understood -most- _some_ of this
WG21 : Despite c# and the ecma, people still complain that our 3-years iteration is a bit too frequent.
Array zip is useful for making government api responsive usable
Maybe I’m dumb, but some practical examples would be helpful to understand the usefulness of some of these.
The Regex team doesn't get paid enough to talk about Regex 😂
7:14 - not a fan of putting functions on side of the creation of the variables. Allow .then() on everything not just observables or could make .destruct() that basically works the same on any of destructible things.
I really wanted array zip for a while, happy to see it's moving up.
Not sold on the destructuring transformers syntax, it looks super weird to me to wrap things in what looks like a function call on the left side of the = sign.
Also iterator methods. Might finally start using those. iterators/generators are a cool concept but it's hard to work with when they're missing features from arrays.
Still waiting for custom operator overloading though. I wouldn't use it too often but sometimes writing thing1 + thing2 just makes so much sense. JS is the only language I use that doesn't have it. Maybe next time.
I don't know if the power of operator overloading should be trusted to JS devs..
But hey it's always fun to throw stuff and see what happens 😹
Or maybe it's just me that the only place I saw it was in C++ and already an incomprehensible mess sometimes
If it only applied to the same class instances I guess it could not be that bad
@@ivlis.w I've used it successfully in Rust and C#, and it's also available in python. So lots of high and low level languages do it, why not JS. I think ideally you'd use it with [Symbol.add]: (value1, value2)=>{...}, seems reasonable. Could even be used on plain objects
So, um, any other TDD warriors thinking what I'm thinking after watching the sponsor message? ;)
Object extractors looks awesome
if JS is trying go struct that far to Rust, then why not create a new version of Type struct like Typescript but run it natively?
I want tot see the increate of the enum right now
chapter timestamps would be nice
feels like a fucking fever dream, js people please go see lua
every week is a crazy week in javascript. such a messy language.
so still nothing new on pipe operator?
Extractor pattern is bull, not usable, because it is more symbols to type and very hard to understand. const should be followed by the name, not function call.
CodeRabbit yaps too much
You can disable individual yapping sections and tools that makes it yap more. You can also customize prompts and ask it to yap less. Or to swear like a pirate or something.
"import source". Why not "import a from '' with { type: 'source' }"
+1
i tried bullying code rabbits pr comments because of you theo, but it started posting crying emojis with bunnies😭
Csharpzation of js
I'd love iterators to be more efficient.
They are terrible at the moment (or I f*ed up my benchmarking)
2:30 Theo a human supremacist
I hate most of these proposals. Might move to webassembly :/
No real fixes tho
...and no one will ever use them cuz they are all still trying to learn ES6!
I feel more reluctant to program and learn javascript, like php, every time javascript decides to add things that could be done before with new sintaxis and keep supporting previous features.
It's like watching c++1993 compared to modern C++, but 30 times worse.
Those big changes we cannot completely use , until every major browser, decides to implement and ship it
Did something change? It’s always been like that, so I was wondering if you heard that somehow they figured out how to reverse the implement->use process to a use->implement process.
Decimal + Extractors = const Decimal128(dec) = "1.25";
The JS structs proposal is terrible.
Make a videos on express.js v5
you didnt liked the tweet
Dear TC39 homies,
I humbly request that you let me hijack styling, button text and callbacks on each button from the browser default alert() and confirm() methods
signed,
jesusTakeTheWheel™
There is a new model of llama 3.1 neurotron from NVIDIA appeared a few days ago, that should be more powerful than 4o from chat gpt. Will you make a video on that?
I don't like this, JavaScript is slowly becoming Java, but much more unorganised in terms of syntax!
Temporal is pronounced with the emphasis on the first syllable not the second: TEMPoral not TemPORal. Like "Temporary" not "Tempura."
These features all sound good on their own but the language just feels like it's getting too big.
It’s funny seeing people complaining about this at the same time as people complaining javascript doesnt have all the syntaxes / std library features they wish it did
(I’m not saying anything about who’s right or wrong though, just appreciating the irony of the fact)
On the contrary, the more it has, the less data you'll have to transfer over the internet
And you can always not use the features
@@b_two haha, I got the exact same feeling, keep watching people who either have to code with js everyday or people who just barely code anything for the web complaining the both side.
I was too busy to tackle problems, the only thing I more care about it's just the consistency, javascript is infamous for its inconsistency of builtin functionalities in the past. And I'm suffer a lot from it and have to create lots of functions that mimic the std lib from other languages that are supposed to be the behavior of some of current functions.
It seems like I rarely see people talking about it except the date lib, and finally they address it.
Poor Theo. Here, take this and save it, have a relief until native chunks come.
const chunkify = (arr, size) => {
const result = []
let index = 0
while(index < arr.length){
result.push(arr.slice(index, index + size))
index += size
}
return result
}
It is ironic that you're making fun of how simple it is to implement, while also simultaneously implementing it wrong?
The one in the video operates on streams, not arrays, meaning you can chunk data without first reading it all into memory. Your example will read everything into memory first and then create new slices from it.
I also do agree that this is not some insane mind-blowing thing where people couldn't have just implemented themselves.
@@essamal-mansouri2689 well said
Why the F are your ads so useful? 0_o
I work in realms all the time. I think it is fun!
Im sorry but i hate this. The only purpose for such a feature creep is to make it impossible to create competitors to the established browsers, specs should be simple and minimal, if you can implement it in JS there is no need for a standardization of the feature. You are killing the free and open internet with feature creep. You will make it impossible to implement a browser by a small dedicated team...
13:18 just .isError?
Why not .is generally?
They’re not thinking far enough.
isDate, isUrl, isMyClassName etc.
Nobody contributing thought of extending the concept further? 😳
Me, a Rustecean: "Odd, but starting to feel like home"
hi theo!
why we need AsyncContext when AsyncLocalStorage exist ?
it's not JS anymore, it's J#++ust
That's all my favourite languages in one haha :D
100% bloat
If JSON does not also support the decimals, it is hardly of much use in APIs ...
We live in a time where you need a vscode fork which uses AI to imports instead of an actual LSP. Bro.
js is becoming a worse clone of rust. but js still sucks
I want extractors so bad
Earliest I’ve ever been lol
First here
@@nonefvnfvnjnjnjevjenjvonej3384 Save your career by being a little more mindful!
You spelt it wrong!
People lost the ability to write simple functions.
10:15 You want "chunks" so bad? man, it's literally 2 lines to implement
Why so serious?
Yeah but we love language features.
The difference is it's going to be optimized for you at a deeper level.
On top of that, rather than copy pasting an implementation, even 2 lines, from project to project, anyone would be happier with it being a language feature. Why would you not want that to be a feature?
In C#, Linq is literally every dev's favorite built-in library, and all it contains is a bunch of functional helper functions for data handling. A better standard makes for a better language.
Why don’t you implement your own String data structure?
@@Exilum That's not a real comparison at all because Linq does a lot in terms of performance and when it comes to using something like Entity Framework, things like defining the conditions for a query is only possible as native comparisons because Linq can be used to translate them into actual queries at runtime. That said, things like chunking or stream and array operators in general should generally be part of the standard library so I'm not mad about that. But Theo will always exaggerate things like this like "ohhh this would make X and Y so much easier I had to struggle with A, B, C" is basically a speech pattern for him. It's a streamer thing, I think.
SECOND
First
First