Why I Was Wrong About TypeScript • TJ VanToll • GOTO 2018

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ม.ค. 2025

ความคิดเห็น • 99

  • @sidhree
    @sidhree 4 ปีที่แล้ว +11

    Cut to the chase: 27:41. Cheers for making this public!

  • @paulalexwilson
    @paulalexwilson 5 ปีที่แล้ว +13

    Well structured, well researched talk with nice historical context for newcomers to this space.

  • @sanderd17
    @sanderd17 5 ปีที่แล้ว +3

    I use the typescript compiler, to check my jsdoc type definitions. But until now, I never wanted TS to be a hard requirement for my projects as I always saw it just like the new coffeescript... My opinion is changing now.

  • @danielzaretsky1375
    @danielzaretsky1375 5 ปีที่แล้ว +10

    title should be: Why I was Wrong About TypeScript: Because I work in marketing for a company that offers typescript conversion and need to keep my job and I wanted to get your attention through a click-bait title and subliminally pitch my company's offerings to justify my talk.

  • @MarkLeMerise
    @MarkLeMerise 6 ปีที่แล้ว +6

    Thanks for an interesting talk, but at its core, the thesis (given at 24:00) isn't exactly new in JavaScript tooling land: something was evaluated on its popularity (or lack of) and origin (the then-evil Microsoft), rather than its technical merits. There has been tumultuous churn in the ecosystem for the better part of a decade, and only recently has the community learned to slow down and rally around best-of-breed tooling, rather than constantly jumping between hype trains. We're still developing the sense of technical appraisal and long-term viability over npm download count.

  • @edgarsantos7782
    @edgarsantos7782 5 ปีที่แล้ว +13

    My two cents:TS promised a lot, and it's great with type safety ... but! if you allow your team to use the type any, you will end up with something as I did some days ago, I found a boolean with "true" instead of true which believe it or not brought some problems. By using any you can "violate" type safety to a level I find dangerous because you will code believing you are "safe" where you are setting yourself up to a big slip.
    And when I saw a colleague solve a problem by accessing private members of a class by casting it to any (sure at the end of the day is javascript) and give it the value it needed to give. (not going to argwe the 100 levels of wrong that he did, I wasn't his boss).
    So TS is great if any is banned (but can you really, specially with Angular which uses in it's code 'any')>
    TS promises order where JavaScript allows chaos, but only if your team follows the rules (which until today I haven't found one that does to 100%).

    • @eliseumds
      @eliseumds 5 ปีที่แล้ว +1

      A lot of projects are now enabling strict checks, which is great. I work in a big project and two microservices that deal with analytics and Elasticsearch are fully typed, without "any", including all external libraries, but for React-related stuff it's much harder but getting better in a fast pace with component generics and conditional types. I can only imagine the horror of developing using Angular with those interpreted templates. There's just a very steep learning curve because it deals with too many cases, but once you get there it's pure quality goodness.

    • @HungrysitesRu
      @HungrysitesRu 5 ปีที่แล้ว

      Ok, any is banned.
      1. library d.ts is outdated and doesn't include significant changes or fixes, you have to write a lot of d.ts code (100s of lines just to use a lib)
      2. library doesn't have a d.ts (you WILL meet this type of libraries in any large project) -> weeks of work wasted
      3. TSs terrible type inference that sometimes just-doesn't-work -> you have to cast explicitly
      Also TS is not native to 80% of the libs, it's cool when definitely-typed team made a good job supporting some obsolete version of it.

  • @LaloMartins
    @LaloMartins 5 ปีที่แล้ว +3

    I think you made the right decision, at the time. Now I don't know, but at the time it was absolutely correct.

  • @LAYG0
    @LAYG0 5 ปีที่แล้ว +10

    I was forced to use CoffeeScript once & it took me longer to understand what I was writing compared to TypeScript. I enjoyed working with TS & wouldn't hesitate working with it again. Those saying JS is fine haven't worked in large code bases with LOTS of other devs.

    • @vargr4730
      @vargr4730 5 ปีที่แล้ว +3

      I do, and have. TS does not make the entropy of large teams and code-bases any better.
      In fact, it makes it worse, since now people are writing code in even more styles...

    • @HungrysitesRu
      @HungrysitesRu 5 ปีที่แล้ว +3

      It definitely helps with refactoring and debugging but the price is much less readable code and much less productivity (40% wasted time - making TS happy where the types are broken, new lib version unsupported, type inference is terrible etc).
      I feel much less happy (because frustrated) and much less productive with TS even on large codebases (30k+ LOC).

    • @HungrysitesRu
      @HungrysitesRu 5 ปีที่แล้ว +1

      I would be much happier to have a true statically typed language without this let's-make-js-typed. Like clientside Golang or something but it's not going to happen any time soon.

    • @sanderd17
      @sanderd17 5 ปีที่แล้ว +2

      Any opinions on Typescript the language vs Typescript the typechecker (which can check JS files with type info in JSDOC comments)? I honestly like the typechecker as it helps with coding (has better autocomplete, notifies you for wrong types,...). But it does mean my projects don't depend on the compiler.

  • @rwxrobfun
    @rwxrobfun 6 ปีที่แล้ว +6

    Worth noting that Deno (Rahl's next version of Node, fixed) has core TypeScript support.

  • @bestd2136
    @bestd2136 6 ปีที่แล้ว +39

    48 minutes of excuses on why he was wrong in the past! I can't believe I wasted an hour of my life listening to this guy!
    I can't believe this guy did an entire conference talk to tell how wrong he was when against TypeScript, and he still claim that TypeScript success was due to a PR campaign and and Visual Studio Code, instead of acknowledging it on its own merit. He is so disingenuous. He is still looking for subtle way to masquerade his poor judgement. I am sure he doesn't know that one can use TypeScript with Sublime Text, WebStorm and many other IDE or text editors.
    He was wrong, he should finally sincerely acknowledge it, apologize to his dev team and move on!

    • @obinnaokafor6252
      @obinnaokafor6252 6 ปีที่แล้ว +3

      Hahahahaha

    • @borisyordanov7939
      @borisyordanov7939 6 ปีที่แล้ว +2

      He literally says he didn't think about TypeScript from a technical perspective. What's technical about a programming language, right?

    • @ChRs
      @ChRs 6 ปีที่แล้ว +1

      Thank you for the heads up!

    • @zack123787
      @zack123787 6 ปีที่แล้ว +15

      Thank you for saving me an hr

    • @doctorgears9358
      @doctorgears9358 6 ปีที่แล้ว

      Rarely do people operate in such a reasonable way.

  • @MartinKramer-ff5mt
    @MartinKramer-ff5mt 8 หลายเดือนก่อน

    I did not know that you were the inventor of typescript, happy to know

  • @DustinDeus
    @DustinDeus 6 ปีที่แล้ว +13

    It's more interesting to hear why you thought you was right. It's easy to hook on already known advantages. When you have no arguments this presentations only proofs your naivety according new technologies.

    • @obinnaokafor6252
      @obinnaokafor6252 6 ปีที่แล้ว

      Hahahaha

    • @goqsane
      @goqsane 5 ปีที่แล้ว +2

      English please?

    • @GolderiQ
      @GolderiQ 5 ปีที่แล้ว

      Nathan Green that's the past. They are now the first company in Open Source with TypeScript and Visual Studio Code. Really check GitHub. Some things related to C# had also been released open source. Windows 3.1 too. The new terminal and the calculator app too. They also contribute heavily on other companies open source projects like Docker, Kubernetes, React, Angular, Linux and even more affiliating with open source foundations. It's the Microsoft of Satya Nadella. This man and Google's Sundar Pichai rules.

  • @Maya_ni_Ochiru
    @Maya_ni_Ochiru 3 ปีที่แล้ว +1

    i was so confused that typescript is worth it or not and wanted to learn it but now im clear that it is worth my time owo

  • @HungrysitesRu
    @HungrysitesRu 5 ปีที่แล้ว +2

    1. outdated d.ts (most of them are because most libraries are not natively-typescript)
    2. broken/inaccurate d.ts (most of them are because noone wants to rewrite the entire library)
    3. terrible type inference (cannot understand that some object matches the complex interface), you have to cast sometimes
    TS makes me less productive
    TS make me frustrated, less happy, sick of doing my job
    I have experience of writing 10s of thousands of code in TS and 100s of thousands in JS.
    Sometimes it's helpful (debugging, breaking builds because of mistypes, fast refactoring) but in my experience it wastes much more time than it saves. I know developers that spent weeks struggling with making TS happy where in JS you wouldn't have any problems. The issue is that it's not native both for the underlying language and libraries. I'd be glad to better have a REAL statically typed language (not a handicapped "superset") like client-side Golang or even Swift/C#.

    • @shalokshalom
      @shalokshalom 4 ปีที่แล้ว

      F# and Fable has a really great type system and also a lot of other languages who compile to Javascript like Nim, Haxe and Elm.

  • @SleazyNice
    @SleazyNice 2 ปีที่แล้ว +1

    TypeScript is for people who don't know JavaScript.

  • @boheem3451
    @boheem3451 6 ปีที่แล้ว +3

    What was wrong with powerpoint?

  • @aaronbell5994
    @aaronbell5994 5 ปีที่แล้ว +2

    I didn't know about control + click to go to a func def! Thank you!

  • @i3looi2
    @i3looi2 5 ปีที่แล้ว

    Most of stuff initially presented in Typescript were migrated slowly but steady to JS with each new ES/ECMA standards.
    Example: using () => , class etc.
    So given time, browsers will support all these Typescript features directly in JS, BUT with backward compatibility.
    So.. why I need Typescript again ? Sure , I could need/use it RIGHT NOW. But trends show, it will become obsolete.

    • @anthonymarquez2542
      @anthonymarquez2542 4 ปีที่แล้ว +2

      unless js main adopts type checking I doubt that.

  • @gs-ej8gb
    @gs-ej8gb 4 ปีที่แล้ว +2

    so all the fuss comes from a bunch of upset devs with their pride wounded cuz of the "imperfect" javascript became the most popular language in the world

  • @HeatSeekingMouse
    @HeatSeekingMouse 6 ปีที่แล้ว +8

    This guy would be a nightmare on the team

  • @navalsaini
    @navalsaini 6 ปีที่แล้ว +1

    Some things are incorrect here.
    1. If we are using interfaces and generics; there is a steep learning curve for Javascript developers. It takes quite a bit of time and some developers can keep iterating continuously over interfaces.
    Advantages of typescript
    1. If you have same variable used at a lot of places (coupling - nested via components in react), then typescript interfaces make it easy to refactor and rename those variables.
    2. Auto-complete is pretty good. I think typescript is great for writing complex libraries. (I think auto-complete should work if my library is in typescript and my code is not)
    It may be an overkill for a simple application (unless you are clear on where you want to use typescript and where you don't want to use typescript). It can see that it does scale well for big codebases and large teams (but so would flow, which is 'opt in'). Disclaimer: I have used typescript, but I have not used flow in a project (so far)

  • @slapusillydawg
    @slapusillydawg 6 ปีที่แล้ว +16

    Tough crowd

  • @dinoscheidt
    @dinoscheidt 6 ปีที่แล้ว +20

    Yeah, the only team that is left being lazy ass about TypeScript is the React & React Native Team at Facebook. They should finally kill flow and adopt a super set = TypeScript.

  • @codeone6423
    @codeone6423 3 ปีที่แล้ว +1

    great talk thank you

  • @eatfruitsalad345
    @eatfruitsalad345 3 ปีที่แล้ว

    Wow -- had no idea Trello was written in CoffeeScript

  • @toneyf
    @toneyf 6 ปีที่แล้ว +12

    Great NativeScript ad in 48 mins

  • @Ipadstands
    @Ipadstands 5 ปีที่แล้ว +3

    I am writing this after viewing the first 25 minutes. I will revisit after watching the second half. I am pretty new to the Web side of programming. I wanted to learn the basics to get a web site up. I liked the idea of Java Script on the Front end and on the Back end. I did not want to learn the extra tool chain of Type Script to use Angular 2. So I have only used Angular JS. I am sure TS is not that painful to learn and gets the job done. I just had to draw the line at how many new pieces I was going to learn. It is interesting to see why TS won the battle over Dart and Coffee Script. It sounds like MS wanted a piece of the action and slipped in something oh just so slightly better from what I gather from this video. Then fast moving companies had to adopt something ? and now they are committed to this tech and promote it. I am sure it is good enough. I may be committing suicide by just using the old tech but my project is small. Thanks for the TS adoption video.
    After finishing the video , I will most likely direct my energy to move to TS. I watched a video on Setting up WebStorm to use TS and it was crazy full of gyrations to get it to work. Probably run it in pass thru mode for a bit and take TJ's advice and slowly add features. Thanks for the video !

  • @yevhenkozlov286
    @yevhenkozlov286 6 ปีที่แล้ว +3

    is it only me thought presenter stands on treadmill that is moving?

  • @CTimmerman
    @CTimmerman 5 ปีที่แล้ว

    28:18 CoffeeScript also supports plain old JS. And if types are the only advantage of TypeScript in a modern browser or one using Babel, then Flow should suffice. VS Code appears to already use type inference for plain JS.

    • @shalokshalom
      @shalokshalom 4 ปีที่แล้ว

      Typescript also implements modern Javascript standards and own stuff

    • @shalokshalom
      @shalokshalom 4 ปีที่แล้ว

      And Typescript has much much more support by different frameworks as Flow, VSCode as an example is written in it and probably the reason for the type checking in Javascript

  • @serhiicho
    @serhiicho 5 ปีที่แล้ว +8

    Everybody is wrong about TypeScript until they use it in a project and see all the benefits of it.

    • @mrfeynman42
      @mrfeynman42 3 ปีที่แล้ว +1

      And shortcomings

  • @stefan1632
    @stefan1632 6 ปีที่แล้ว +6

    I'm sorry to say I found this presentation lacklustre. The section where he says JavaScript should be left alone like god intended demonstrates a level of hubris. Developers can look for low hanging fruit when entering new codebases to elevate their position but what they should be asking is why. Well that decision cost him time learning and me an hour of my life 🤦‍♂️

    • @ChristopherBloom
      @ChristopherBloom 5 ปีที่แล้ว +2

      Did you miss the part where he admits he was wrong about that and went on to learn from his mistake? Which is, of course, the title of the presentation.

    • @stefan1632
      @stefan1632 5 ปีที่แล้ว +2

      @@ChristopherBloom No I didn't but the presentation from my point of view had little value and was dull. It's great you found value in it.

  • @aoeu256
    @aoeu256 5 ปีที่แล้ว +1

    Is there anyone here that uses TypeScript that prefers prototypes to classes, and REPL based development to IDE based development?

    • @shalokshalom
      @shalokshalom 3 ปีที่แล้ว

      Classes are prototypes under the hood

    • @edgeeffect
      @edgeeffect 3 ปีที่แล้ว

      I don't use prototypes OR classes... functional constructors and composition over inheritance are they way to go for me.

  • @steve_seguin
    @steve_seguin 5 ปีที่แล้ว +3

    "Java, C#, Ruby" -- all languages I dislike. Haha, I actually liked Javascript.

    • @steve_seguin
      @steve_seguin 5 ปีที่แล้ว +6

      "JavaScript classes, introduced in ECMAScript 2015, are primarily syntactical sugar over JavaScript's existing prototype-based inheritance. The class syntax does not introduce a new object-oriented inheritance model to JavaScript." -- Microsoft.
      Typescript is no different. Just sugar designed for Java developers who wouldn't stop complaining about Javascript

    • @steve_seguin
      @steve_seguin 5 ปีที่แล้ว

      That Typescript to Javascript online tool is a great example of how there are so many different ways to do the same thing now in ESMAScript. It makes me cringe watching all those examples. ahhh

    • @steve_seguin
      @steve_seguin 5 ปีที่แล้ว

      Bless you for using semicolons at least.

    • @danilo2735
      @danilo2735 5 ปีที่แล้ว

      @@steve_seguin Typescript makes code more organized, when i try to read a js code that i wrote 6 months ago... it is easy to write bad code with js.

    • @intervalia
      @intervalia 5 ปีที่แล้ว +3

      @@danilo2735 Typescript does NOT make code more organized. Good developers do. Typescript has it value, but it also costs more since you have to type more to accomplish the same thing (types, interfaces, etc.) Typescript was created to allow developers of Java, C# and other strongly typed languages to migrate easier to JS. But it is not the holy grail.

  • @1Eagler
    @1Eagler 5 ปีที่แล้ว +1

    Why typescript needs to be translated? Why isn't the successor o JavaScript?

    • @danilo2735
      @danilo2735 5 ปีที่แล้ว +1

      because browsers only understand js

  • @zbynekriha
    @zbynekriha 5 ปีที่แล้ว +1

    Grog is not hot wine

  • @tallgeese1
    @tallgeese1 5 ปีที่แล้ว +2

    This revelation could be attributed to a lack of humility about one's abilities and experience.

  • @JamesAwokeKnowing
    @JamesAwokeKnowing 2 ปีที่แล้ว

    you were not wrong

  • @originalhat
    @originalhat 5 ปีที่แล้ว +2

    "Types are opt in." Okay: `//@ts-ignore`.
    Tools should improve productivity, and therefore by consequence business value. This should be a discussion based about the ROI involved with using such tools. Simply saying something is "nice" isn't a trustworthy quantitative analysis of the the problem and solution. I guarantee that even, if not especially with TypeScript, developers will manage to muck things up, only now they'll be mucked up with one more degree of complexity overlaying upon the underlying ecosystem. We like to think that because TS is "just JS" that we have some easily accessible escape valve for converting back to the native ecosystem, but this simply isn't true. Teams are better off understanding the native ecosystem at a more fundamental level, and improving their general understandings around best practices and applicable Code Patterns.
    TS is fun, and it gives the illusion of productivity. JS gets the job done without the fuss.
    Tools should be considered and leveraged, but without losing focus of the underlying cost.

  • @fagner-sa
    @fagner-sa 6 ปีที่แล้ว +4

    How much M$ paid?

  • @zurvey
    @zurvey 4 ปีที่แล้ว +1

    I cannot imagine why anyone would give this talk a thumbs down. I just hope I never accidentally hire one of them. 😉

  • @JamesAwokeKnowing
    @JamesAwokeKnowing 2 ปีที่แล้ว

    the reason he likes it is now his job is to give talks instead of code. need new stuff to talk about.

  • @nelsondcp
    @nelsondcp 6 ปีที่แล้ว +3

    Having good marketing (ie M$ behind it) and good tooling does not mean a language is good. It just means that companies have thrown money at promoting it. TypeScript is a fad just like the other 2 languages they mentioned. I did not see any points in this talk that would make me change my mind, waste of 47mins and 59secs

  • @PaulComanici
    @PaulComanici 6 ปีที่แล้ว +2

    I see in this talk and in a lot of talks the benefits of typeScript and even with this talk that it highlights invalid calls/data. Please try to use a real editor!

  • @ingusmant
    @ingusmant 6 ปีที่แล้ว

    Phantasy star online rules, ff drools
    Just joking

  • @AdamLindell
    @AdamLindell 3 ปีที่แล้ว

    Entirely unconvincing

  • @shrimpoffthebarbie
    @shrimpoffthebarbie 6 ปีที่แล้ว

    ts + node for microservices is oxymoronic.

    • @Darthvanger
      @Darthvanger 6 ปีที่แล้ว

      Why? :)

    • @shrimpoffthebarbie
      @shrimpoffthebarbie 6 ปีที่แล้ว +1

      @@Darthvanger Because OOP principals such as interfaces are there to "protect" against programmers. But Microservices should be 100% understandable and replaceable. We don't need protecting from putting milk in our own kettles.

    • @nicktho2654
      @nicktho2654 6 ปีที่แล้ว

      @@shrimpoffthebarbie typescript isnt just for monolithic self contained apps. consuming typescript'd libraries in microservices i find makes it so much easier to relyably use them. for instance, aws-sdk is much more dev friendly when consumed in a typescript environment.

    • @shrimpoffthebarbie
      @shrimpoffthebarbie 6 ปีที่แล้ว

      @@nicktho2654Thank's Nick. I'm just a bit old school, using vim, not to be cool (but it turned out that way) but it's just what I know. But I pair program with Visual Code users and for some complex libraries, it can help that's for sure. But I'm a big Ramda fan to boot, and I find it cumbersome t use the two together.

    • @nicktho2654
      @nicktho2654 6 ปีที่แล้ว

      @@shrimpoffthebarbie I can relate, i had to ditch vim when every company i applied to was using typescript somewhere. Vim just isnt up to scratch with its ide-like features

  • @nacest3909
    @nacest3909 5 ปีที่แล้ว

    tl;dr; - just information noise of one annoying guy making smart-sounding arguments about irrevelant things.

  • @anagreug
    @anagreug 5 ปีที่แล้ว +1

    Good overview, thanks!