text stringlengths 0 1.36k |
|---|
[549.98 --> 554.28] And then using this will default to the right thing probably to what you want. |
[554.28 --> 562.64] But pulling it out, like if you just use an instance, kind of like a static function, like this can change very quickly to window. |
[563.40 --> 565.52] Like all those types of problems start to show up again. |
[565.52 --> 571.76] And it's just sugar for, you know, prototypal properties on an object. |
[572.22 --> 574.90] So there are still gotchas if you use the class syntax. |
[575.12 --> 581.68] Like you could still go further and say, I still want to use arrow syntax inside of my classes, if that makes sense. |
[582.86 --> 583.60] Yeah, yeah. |
[583.66 --> 585.18] I guess you could take it. |
[585.18 --> 593.38] And I think if you are going to say we require arrow functions everywhere they can be used, you should also require them in classes. |
[593.38 --> 609.48] So rather than saying like function name, open paren arguments, and then brackets with the function, you should say function name equals open paren fat arrow brackets, if that kind of makes sense. |
[609.56 --> 609.90] Yeah, yeah. |
[609.96 --> 615.28] I don't think that the point that any of these people are trying to make, though, is to be zealots about arrow functions. |
[615.28 --> 621.58] I think the point that they're making is that we can deprecate the use of the function keyword and just rely on these new rules. |
[621.82 --> 622.28] Yeah, I disagree. |
[622.64 --> 629.76] And then we get out of a lot of like ambiguity if we're just using the new rules around classes. |
[630.32 --> 636.40] I think I disagree on what those people, at least the people I've talked to who are doing this, aren't necessarily. |
[636.40 --> 642.46] They're not doing it just because they think it looks better or it's smaller or it's more streamlined or anything like that. |
[642.50 --> 649.30] They're explicitly doing it because of the lexically bound ambiguity like problems go away. |
[649.78 --> 656.42] And so you end up with a program that only has lexically bindable functions. |
[656.42 --> 667.86] And so it's important to do it everywhere, even if the syntax is old, like if there's some way to use the old function syntax and then just say, oh, this is a lexically bound function. |
[668.18 --> 669.24] Like they would still be cool with that. |
[669.32 --> 670.40] It's not about the fat arrow. |
[670.52 --> 677.14] It's about the semantics of how the function kind of exists and how it can change and what contexts it can run in. |
[677.34 --> 683.76] And it's taking away the foot gun of this changing out from under you, I think is the goal. |
[683.76 --> 692.56] So transitioning a little bit, like we're talking about all these features and I assume that we're talking about using them. |
[693.00 --> 695.76] Actually, my assumption is that we're talking about using them without a compiler. |
[695.98 --> 698.10] And I think that may not be your assumption. |
[699.68 --> 705.62] I'm wondering, like, so where can you where do you have to have a compiler down to ES5 to use this stuff right now? |
[706.00 --> 711.56] Like where like like are there IoT devices that have older VH that we have to worry about? |
[711.56 --> 717.08] Are there like which browsers like still don't support this kind of garbage? |
[717.30 --> 719.54] I mean, we're not supporting IE6 anymore, right? |
[719.64 --> 720.54] Like we're done with that. |
[720.64 --> 721.56] That conversation is over. |
[721.56 --> 726.96] So like IE9 doesn't, IE1011 get into some of the territory, but still are missing quite a bit. |
[727.30 --> 732.92] I think the problem is that, and Babbel's perfectly capable of doing this. |
[732.92 --> 739.38] It's just somewhat uninteresting to try to solve unless there's a performance problem. |
[739.76 --> 747.36] But if you think about your application, there's probably, let's say you're using 10 new ES star features. |
[747.36 --> 758.48] And one of them is like object spreads, which is like totally going to get in the language, but isn't in any browsers or node or anything like that. |
[758.54 --> 760.82] It's just like an obvious thing that we're going to do. |
[760.92 --> 767.62] And it's really useful to be able to, much like an argument spread or an array spread, you can do the same thing into an object. |
[767.84 --> 772.86] It kind of like finally solves the jQuery extend thing. |
[772.86 --> 779.26] So does object assign, but the problem is that you're already compiling with Babbel at that point. |
[779.88 --> 782.70] And so you're saying like, well, I want all these features in Babbel. |
[783.04 --> 787.48] And you could just say, well, I just want object spreads and I know the rest will. |
[787.80 --> 791.64] But at the point where you pull in a compiler, you're like, well, I might as well just go down to ES5. |
[791.92 --> 793.28] And I think that's the common way. |
[793.34 --> 800.70] It's just let me pull in all of everything that I know I need to compile to because I want to just work everywhere. |
[800.70 --> 807.26] And then people don't think about it too much past there because there isn't too much of a hit for many things. |
[807.64 --> 809.68] This isn't my thinking at all, though. |
[809.98 --> 817.42] And like, I don't know if Rachel feels similar to this, but like I don't use a compiler like ever for like down to a different language. |
[817.62 --> 820.06] And so like I only use browsers that support this. |
[820.10 --> 823.82] And like if it's a feature that isn't widely available, like I just don't use that feature. |
[824.00 --> 824.36] Same. |
[824.64 --> 825.24] I don't. |
[825.32 --> 825.56] Yeah. |
[825.94 --> 827.68] I think you guys are definitely in the minority. |
[827.68 --> 831.34] I don't think like that seems a little nuts to me. |
[831.48 --> 837.22] Like I really enjoy like line numbers and like just like a lot of the simplicity of not having it. |
[837.96 --> 839.16] Well, yes, yes, yes. |
[839.68 --> 841.30] Provided that you have all that tool properly. |
[841.52 --> 843.00] And it can be kind of a pain. |
[843.14 --> 846.34] I mean, like, look, if you're going to use Babel, then you're already in this boat. |
[846.42 --> 848.66] Or sorry, if you're going to use like React, you're already in this boat. |
[848.98 --> 849.12] Right. |
[849.42 --> 855.70] So there's enough people like using frameworks or other upper level tools where the compiler is just part of that tool chain already. |
[855.70 --> 861.40] But like I'm certainly not going to add Babel to my Node project in order to use object spread. |
[861.56 --> 862.90] Like that's not going to be that. |
[863.06 --> 864.68] That's just like I don't understand that thinking. |
[864.82 --> 866.44] And I don't think that a lot of people do that. |
[866.72 --> 868.56] I think a lot of people do that. |
[868.74 --> 878.58] I think it's pretty common these days to just start your project writing in the new thing, even if it's compatible with like the latest browsers or the latest whatever. |
[878.98 --> 880.16] Your pure Node module? |
[880.34 --> 883.64] Your pure Node module, you're going to like already have a compiler. |
[883.64 --> 891.72] I think Node is a little bit less this way because there are different norms there. |
[892.38 --> 897.32] But I think even in those cases, it's somewhat common to see. |
[897.80 --> 898.18] Yeah, sure. |
[898.76 --> 903.20] Like I wonder how many IoT projects Rachel has seen where they're compiling things with Babel. |
[904.58 --> 906.76] Not many, that's for sure. |
[906.76 --> 917.92] Yeah, I mean, I think IoT projects in the grand scheme of the amount of JavaScript that's being written are a small percentage. |
[918.40 --> 920.92] And that doesn't make them unimportant or anything like that. |
[921.00 --> 927.56] I'm just saying that I think the average JavaScript developer these days is working in a framework. |
[927.56 --> 935.28] And those frameworks somewhat already introduce enough compile steps to where it's just a non-issue to add this. |
[935.36 --> 946.46] So if you're working in Vue or you're working in React or you're working in Ember or you're working in Angular or you're working in any of these things, you have a Babel-like compiler already in your stack. |
[946.46 --> 951.28] And so adding object spreads is just like a decision you can make or not. |
[952.10 --> 958.40] So I feel like the most of the features that I have used and interacted with would have been like things that we touched on already. |
[958.60 --> 965.52] You know, cons, let, arrow functions, some of the way that they're doing class definitions and stuff like that. |
[965.84 --> 969.24] I guess this is about going to be the same thing that Michael was just about to ask. |
[969.30 --> 971.94] Are there any like features that you aren't using? |
[971.94 --> 979.34] Like which ones do you two think are the ones that people aren't really like, you know, fully embracing or trying out yet? |
[980.00 --> 982.24] I mean, I guess there's two buckets there. |
[983.32 --> 993.36] Ones that people aren't trying out yet because they're bad and ones that people aren't trying out yet because they aren't fully aware of them or they aren't fully powerful or things like that. |
[993.52 --> 996.24] I guess there's things that go in both buckets. |
[996.24 --> 1005.40] I mean, a lot of the stuff we use in Babel and the stuff that we're compiling down to is stuff that isn't even finished getting through ECMA and will change. |
[1005.60 --> 1007.48] Like modules is something that everyone uses. |
[1007.66 --> 1014.46] And like a lot of the semantics of how modules load like haven't been known for a really long time. |
[1014.46 --> 1033.84] And that's kind of the driving force behind the problem with getting proper modules into Node specifically because we've been doing it slightly wrong for so long because we kind of just wanted to compile ahead of time that now there's a clash in the semantics of how it should really work. |
[1033.96 --> 1038.12] And we're going to have to kind of work around that problem for a little while. |
[1038.12 --> 1047.86] Yeah, I mean, without getting the specifics there, there's actually a particular point where the spec sort of implies but does not define how things are supposed to work. |
[1048.40 --> 1051.12] And Babel made a decision about how they work at one point. |
[1051.94 --> 1054.48] And we're not going to be able to support that. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.