Jake and Surma look at the modern JS & web features we take for granted.
Subscribe to the channel! → http://bit.ly/ChromeDevs1
Watch more HTTP203 → http://bit.ly/2sPq2LB
Listen to the HTTP203 podcast for more content! → http://bit.ly/2Kryv2y
Itunes → https://apple.co/2IQagG6
Original source
40 responses to “Old vs New JavaScript – HTTP203”
Prototypical inheritance is a class system. Car is a class, and c = new Car() is an instance of a car.
ES6 classes don't change that. There's still an object with a prototype, and those methods still exist on that prototype. It's "merely" synaptic sugar. I think it's very useful sugar, but it doesn't actually change the mechanics of classes.
What should I do?
Native typescript support? )))
All this stuff works in the browser right now?
Is there a reason for the non-oneline solution (Car.prototype = Veichle.prototype) at 2:35? I'm thinking as the prototype still refers to the Veichle prototype in your example. 2:57 also seems a bit odd since it's still all prototypical inheritence under the transpiled hood.
Don't get me wrong, I love the new synax sugar. I just find that this video could be a bit confusing for people that think they are "free" from prototypes just because of the new syntax sugar. I also don't think you should dismiss prototypes as being old and qwerky, as they do enable you to do a lot of cool stuff during runtime.
This video could probably be more useful if our transpile target was WebAssembly rather than es3/es5.
does anyone know what's the name of syntax of { duration = 1000 } = {} ??
You don't know how happy I was when Jake said he designs in devtools and then just copies the stuff back to the editor. OMG! So do I!
Great episode, but the talk about prototypical inheritance is weird. They were talking about it like it's a weird bygone language trait that we would all rather forget…. Javascript is a prototypical language, and classes are just syntactic sugar over prototypes. Which is why I don't use classes and stick with prototypes, because I like the syntax, it shows me what is actually going on, and has performance benefits in certain circumstances. That is when I do OOP in JS, which is not that often nowadays.
I think it's gonna be another 5 years until `el.animate` is well supported, future generations will have to suffer trying to implement programmatic CSS animations. The thing I'm most excited (and will probably be better supported than web animations) is OffscreenCanvas.
Thanks this episode was 🔥🔥 Look we have nice things now 🤔😁👍
great! plz more of this!
Thanks Jake and Surma. Very excited to know about the clean way of the FileReader part. So I have a question about this one: Does Response just apply to readAsArrayBuffer() and readAsText() of FileReader, how about the readAsBinaryString() and readAsDataURL()?
REDUCE THE RAM USAGE I BEG YOU
Great episode! Thank you guys
Damn it even closed captions doesn't catch everything they say
Loved it
I do not like chrome browser, and I cant even say why.. just so…. but you guys are great 🙂
are making these chats easier to follow or am i getting better at coding ? i understand most of the chat with examples. What you guys think of react?
Yes, the backslash is needed on the plus sign (@ 9:10)
All the tutorials and SO answers showing the old ways haven't gone anywhere… 🙁
you’re disgusting, that’s prototypes.
3:08 I'd write it as
var duration = options.duration || 1000;
So CSS can do variable now ? What's next ? Turning it into its OWN fucking programming language with its own 1 MILLION Frameworks per day to learn situation ?
@2:08 😂😂😂 "But that's disgusting"
I just love your sense of humor 😉
I'll twit at you Jake for the missing animation.finished promise in Chrome, although it was pretty easy just to wrap my animation in a promise and resolve it in onFinish
Man this show is awesome, great job, thank you guys 🙂
Excellent! The showing up of the code with pre/after is great. I liked the "challenge" of figuring out what the code was doing before and after. Thank you guys! Good stuff.
You should have just done Car.prototype = new Vehicle();
I love these videos. I have been doing webdev for only a couple of years now and seeing how bad things used to be is very interesting.
This is why i subscribed
I already used the new animations api, it's super sweet for micro animations like clicking a favorite or like button 🔥
Douglas Crawford called an anonymous function of this kind (function () {}) () dog eggs. I agree with him))
Best episode
Learned a lot, Thanks.
i just bypassed all that inheritance stuff completely .. never used it, mainly because i never saw an example that demonstrated real world application/benefits … ill show myself out
8:00 what about event.currentTarget 🤔
A lot of things I used many years ago, I really enjoyed this episode! Good work guys.
Surma's reaction was so pure.
Awesome