text stringlengths 0 1.62k |
|---|
[1357.94 --> 1362.60] the tooling because it's the it really the high order bit here is the tooling it's the fact that |
[1362.60 --> 1370.22] you can get safe refactoring code navigation find all references go to definition etc etc you know and |
[1370.22 --> 1378.80] then and these are just like productivity must-haves today in on large projects right um and and they're |
[1378.80 --> 1385.88] all powered by this knowledge that the compiler has but but if you lock it up in a black box you know |
[1385.88 --> 1392.00] that is just a command line tool then you're not really solving the problem right um so you gotta |
[1392.00 --> 1398.48] you gotta like actually make your compiler into an api and you gotta architect your compiler so that it can |
[1398.48 --> 1406.04] be super incremental and super lazy in in how it it does its work so that it can deliver answers in |
[1406.04 --> 1415.40] sub 100 millisecond time even on a 200 000 line project right which you know honestly if you'd |
[1415.40 --> 1419.78] asked me five years or 10 years ago i would have i would have just said that it's just never going |
[1419.78 --> 1426.46] to be possible in javascript but it turns out it is um what's and so that was sort of that was sort |
[1426.46 --> 1431.98] of a bet you know that we took there on on the on the technology and on our own ability to do it you |
[1431.98 --> 1439.40] know but but it's it's it's worked out what's different um you know what didn't you expect five |
[1439.40 --> 1442.96] or ten years ago when you said that was not possible javascript just the the browser wars or |
[1442.96 --> 1451.08] the hardware has increased or what is it i think the the the order of magnitude um improvements in the |
[1451.08 --> 1458.22] vms i don't think i don't think we all saw that coming it's quite a and and i'll give credit to the |
[1458.22 --> 1464.44] v8 team and and and lars uh bach and the the work they did in orhus is just amazing you know and then |
[1464.44 --> 1468.86] and now we're all doing it you know but but they really sort of pioneered something there that was |
[1468.86 --> 1475.06] quite quite impressive yeah it's kind of a shining example of that rising tide you know brings all the |
[1475.06 --> 1480.52] ships up because once that competition got really kicked off and all parties got involved it was been |
[1480.52 --> 1486.50] fun to watch yeah from our side and just it is amazing what you can do in javascript now that even |
[1486.50 --> 1494.46] three or four years ago was just impossible and possibly slow yeah no that yeah no i i to this |
[1494.46 --> 1502.98] day i am still i i am still you know there are days where i go wow that's amazing well let's pause |
[1502.98 --> 1508.38] there then let's let's dive into some amazing stuff but before we do that let's take a break and hear a |
[1508.38 --> 1514.16] word from one of our awesome sponsors we'll be right back you've heard me talk about top towel several |
[1514.16 --> 1520.64] times in this podcast and top towel is by far the best place to work as a freelance software |
[1520.64 --> 1526.46] developer well they have this term elite engineer and that defines the kind of software developer |
[1526.46 --> 1532.82] that works at top towel i had a chance to sit down and talk to brendan banishad the co-founder and coo |
[1532.82 --> 1539.28] of top towel and i asked him brendan what is an elite engineer take a listen an elite engineer for us |
[1539.28 --> 1544.58] as somebody who satisfies all the technical requirements um that you would need in a great |
[1544.58 --> 1549.48] developer if you're working at like uh like a google or facebook but then a top towel you have |
[1549.48 --> 1554.68] to add this extra layer on top of it to make sure that people are mature enough and professional |
[1554.68 --> 1560.28] enough to be totally self-directed and so making sure that they take a tremendous amount of uh pride in |
[1560.28 --> 1566.44] their work and that they're accountable and very very communicative because in remote freelancing |
[1566.44 --> 1571.26] that's sometimes just as important as being technically competent all right if brendan got |
[1571.26 --> 1575.74] you excited about being an elite engineer at top towel head to top towel.com slash developers |
[1575.74 --> 1582.78] that's t-o-p-t-a-l.com slash developers to learn more and tell them the change load sent you |
[1582.78 --> 1590.96] all right uh so we've been talking heavily and as you got some deep subjects you took there i almost |
[1590.96 --> 1596.14] wanted to vein off on several different directions but i think let's circle around language |
[1596.14 --> 1602.66] design of typescript uh it's a super super set of javascript what what else can you describe |
[1602.66 --> 1606.70] for typescript to sort of take us into the conversation around language design |
[1606.70 --> 1612.84] i think you know i mean so sort of the the the things maybe that are interesting to observe about |
[1612.84 --> 1619.74] it is that traditionally type systems have sort of been an on or an off thing you know you either |
[1619.74 --> 1625.58] had your dynamic language with which had no type system or at least not an observable type system |
[1625.58 --> 1633.12] um and everything was just dynamic or you would be programming in a proper statically type programming |
[1633.12 --> 1638.80] language say like c sharp or java or c plus plus or c or or whatever and everything would be statically |
[1638.80 --> 1643.82] typed so it was either you were either on or you were off on types i think the thing that's |
[1643.82 --> 1649.72] interesting about typescript is that that it is it is an optionally typed or a gradually typed system |
[1649.72 --> 1656.58] you know you we've turned to switch into a dial you can dial up the types it's the dial starts at zero |
[1656.58 --> 1662.66] and that's just javascript and you can literally rename all your javascript files to dot ts and just run |
[1662.66 --> 1668.22] them through our compiler and you'll get a bunch of errors but our errors aren't really errors they're all |
[1668.22 --> 1674.26] warnings right because the output we produce is indeed exactly the same files that came in because |
[1674.26 --> 1679.68] there were no type annotations to remove right so in in so so when the dials at zero we sort of |
[1679.68 --> 1685.74] function as a linter if you will that we do our best effort on inference um but in the absence of any type |
[1685.74 --> 1690.78] annotations you know there's only so much we can infer but based on those inferences we'll give you some |
[1690.78 --> 1696.96] errors right but then as you dial it up and you add type annotations then more and more stuff comes alive |
[1696.96 --> 1703.08] and and and you but you can sort of leave the dial wherever you want right you can use jquery or |
[1703.08 --> 1708.96] whatever a whole bunch of javascript frameworks just as javascript and then you can on the side |
[1708.96 --> 1713.52] provide the type information or not provide the type information and if you provide the type information |
[1713.52 --> 1719.30] in a declaration file then the tool can do more things for you like statement completion and so forth |
[1719.30 --> 1724.68] but it's perfectly happy for you to not do it and then it's just dynamically typed um |
[1724.68 --> 1731.46] and that's sort of been an interesting world to to navigate uh because no one had really done that |
[1731.46 --> 1736.14] before you know and and that i know it was all or nothing right like you had to jump yeah exactly |
[1736.14 --> 1743.10] yeah yep and so so that was a super interesting design point and uh i think we learned a lot from |
[1743.10 --> 1747.42] it i think the other thing that i i would say that that has been interesting from a language design |
[1747.42 --> 1756.36] perspective is that typescripts type system isn't about providing absolute waterproof guarantees that |
[1756.36 --> 1766.08] that these types are correct we're not provably correct we're just correct enough because ultimately |
[1766.08 --> 1771.90] when when you start with a dynamic language where where something could be of type any then you have a |
[1771.90 --> 1777.82] swiss cheese right and it's it's just about plugging as many of the holes as is feasible it's not about |
[1777.82 --> 1785.42] plugging every hole right and traditionally uh java and c sharp and and a lot of other languages have |
[1785.42 --> 1792.82] been about plugging every hole and providing strict guarantees and that's that's obviously useful but it |
[1792.82 --> 1797.76] but it lands you in a different place right and there's but but if you think about it for javascript |
[1797.76 --> 1801.82] there's no way that we could ever land there right because that decision has already been made the |
[1801.82 --> 1808.50] runtime system is dynamic but it turns out that there's still a lot of goodness you can get from having |
[1808.50 --> 1815.88] types um a whole lot of goodness right in the tooling um even if the types are not provably correct |
[1815.88 --> 1822.04] there's one other that i would probably add to that list that i i like which is the structural type |
[1822.04 --> 1829.72] yes yes so traditionally in op and oos systems you're what's called anomaly typed you've got the |
[1829.72 --> 1834.76] class name and you're like all right i'm going to subclass this class name and it's it's every time |
[1834.76 --> 1839.66] you're checking the types you're checking that these names are matching but in javascript everything is |
[1839.66 --> 1845.74] very loosey-goosey i can make an object literal i can pass it in or i can instantiate a class as an |
[1845.74 --> 1851.68] object and pass that in and for us everything we just look at the inside of the type it's the |
[1851.68 --> 1856.86] structures match you know if it walks like a duck and quacks like a duck you know kind of that kind |
[1856.86 --> 1864.62] of thing and that makes it so easy to kind of extend existing systems and grow systems in a really |
[1864.62 --> 1870.32] flexible way that doesn't require these deep inheritance hierarchies yeah it's really lightweight |
[1870.32 --> 1876.50] and it's really nice yeah it's it's much truer to the underlying truth of javascript which is which |
[1876.50 --> 1883.08] is very dynamic right right so first of all i think making it a strict superset of javascript |
[1883.08 --> 1888.42] as far as adoption is concerned is is kind of a brilliant move because now i can dip my toe in the |
[1888.42 --> 1893.50] water right and i can opt in when i want to as opposed to a big rewrite or having to make a big |
[1893.50 --> 1898.98] decision up front to use typescript or plain old javascript but when i opt into those type annotations |
[1898.98 --> 1907.70] it sounds like the biggest wins are in tooling which are valid nice wins of course do you also |
[1907.70 --> 1912.64] have performance wins or is it because the runtime itself is still dynamic um you can't do any compile |
[1912.64 --> 1920.22] time uh performance because it's not probably correct well i mean it's it's it's so so you're |
[1920.22 --> 1925.86] right that you you you i would say it's tooling but it's of course also correctness right then and |
[1925.86 --> 1932.12] you know right sort of the notion that you can sleep better at night because some system actually |
[1932.12 --> 1936.68] like tried to validate your code here and told you about a bunch of problems that otherwise you would |
[1936.68 --> 1942.66] have found that as you ran the app one of the nice things on the typescript team is we had the creator |
[1942.66 --> 1948.42] of the chakra runtime engine the javascript engine for internet explorer so he was helping us early on |
[1948.42 --> 1955.52] the the code that the compiler generated so the classes and whatnot the the corresponding code that |
[1955.52 --> 1960.80] they output he was looking at that and saying all right for this to be optimized we should do it |
[1960.80 --> 1966.90] slightly differently and so his his input meant that if you're writing against the you know class |
[1966.90 --> 1974.16] syntax and whatnot in typescript you're getting very performant javascript on on the outside the carry |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.