TypeScript's Next Release Is Wild

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024
  • I don't know what I expected with TypeScript 5.6, but this is even better than I hoped. Iterators, emojis, and better performance!
    SOURCE devblogs.micro...
    Check out my Twitch, Twitter, Discord more at t3.gg
    S/O Ph4se0n3 for the awesome edit 🙏

Комментарии • 103

  • @lifeisfakenews
    @lifeisfakenews Месяц назад +175

    tsc --noEmit --noCheck 💀

    • @reas0
      @reas0 Месяц назад +26

      your file exists. cool

  • @aleksejminkin1877
    @aleksejminkin1877 Месяц назад +63

    why in the name of 79 archdevils of hell would you want to use emojis as variables

    • @ufffd
      @ufffd Месяц назад +27

      they’re short, rich in visual data, and have meaning that transcends language

    • @ufffd
      @ufffd Месяц назад +65

      if (🤯) return 👍

    • @aleksejminkin1877
      @aleksejminkin1877 Месяц назад +5

      If I see that in the code at least one dev out of (me, the person who wrote this) will need a coffin. Imagine needing to remember how all the emojis are called or their unicode codes.

    • @LukeCreates
      @LukeCreates Месяц назад +2

      @@ufffd This gave me a good laugh lol

    • @LukeCreates
      @LukeCreates Месяц назад

      @@aleksejminkin1877 if (@aleksejiminkin 1877 === 😡) return 😂

  • @shmloney
    @shmloney Месяц назад +56

    The generator will not create a new value every time you call it, it creates an iterator once and then you iterate over that iterator

    • @Daniel_WR_Hart
      @Daniel_WR_Hart Месяц назад +4

      you can create multiple separate iterators using the same generator, but that's just not how you would normally use a generator

  • @Caldaron
    @Caldaron Месяц назад +30

    C# Linq finally coming to Typescript, thank you microsoft ;-)

    • @HMan2828
      @HMan2828 Месяц назад +2

      You could also just use Blazor and write no javascript or typescript at all... ;)

    • @bishaladhikari9499
      @bishaladhikari9499 Месяц назад

      Blazor is a cheat code​@@HMan2828

    • @pikus7450
      @pikus7450 Месяц назад

      @@HMan2828Ya ok, for my internal tool for monitoring internal tools maybe.

    • @pikus7450
      @pikus7450 Месяц назад +1

      Maybe if you’re writing an internal tool for monitoring internal tools.

    • @HMan2828
      @HMan2828 Месяц назад

      @@pikus7450 What do you mean?

  • @JamesDSchw
    @JamesDSchw Месяц назад +5

    My beef with many TS releases over the years surround the cognitive load they incur - more syntax and language semantics to be able to model types in existing libraries in the ecosystem. Releases like this - which just make the experience better without requiring that consumers of the language learn new concepts - make me smile!

  • @WlodekM3
    @WlodekM3 Месяц назад +10

    Wow this is such a QoL update, will try out soon

  • @lemurza5236
    @lemurza5236 Месяц назад +1

    "If you're as fun at parties as we are" Thats was the most amazing line ever and it made my day

  • @ceplma
    @ceplma Месяц назад +1

    And Anders Hejlsberg is also creator of TurboPascal! (yes, I dated myself right now, hugely!)

  • @rikschaaf
    @rikschaaf Месяц назад +3

    15:39 Wow, and people were complaining about HTMX being 3000 lines long...

  • @ColxiKl
    @ColxiKl Месяц назад +50

    Nice additions and changes!
    But are they WILD ? Not even close.
    What is wild here, is the continuous clickbait practices seen all over the place.
    No offense, I'm just sick of this strategies to catch people's attention, and get some extra monetization.
    I find it very disrespectul.

    • @joshua7884
      @joshua7884 Месяц назад

      Thats how all content creator work, thats how you get your search result in google or in youtube. Doest like it? Read book, even book has a click bait...

    • @iRemmi
      @iRemmi Месяц назад +1

      he’s just playing the game, man.

    • @FilipeAguiarCarvalho
      @FilipeAguiarCarvalho Месяц назад

      I bet you're super fun at parties.

    • @RavioliPolioli
      @RavioliPolioli Месяц назад

      Then don't watch

    • @JoeyTen
      @JoeyTen 6 дней назад

      I agree. *However*... If he didn't do that, you might not have discovered his channel. It's just an unfortunate part of current society.

  • @akam9919
    @akam9919 Месяц назад +1

    "Thankfully, I don't write regex. I don't get paid enough for that." So true blud.

  • @Dorff_Meister
    @Dorff_Meister Месяц назад

    I'm glad to see stuff I used in Groovy (and Java) coming to Typescript.

  • @LutherDePapier
    @LutherDePapier Месяц назад

    I can't believe Theo has to explain what a for of loop is.

  • @user-oh1yl1rv5d
    @user-oh1yl1rv5d Месяц назад

    A lot of stuff that I don't want to use because my code should be accessible to beginner/moderate developers. I don't want to complicate things to much. Some complex rxjs, weird reduce statements, generics with little keyof extends Omit, but don't go too obscure.

  • @dasten123
    @dasten123 Месяц назад +1

    yes, very wild and not clickbait at all 👍

  • @simonrazer8303
    @simonrazer8303 Месяц назад +1

    Typescript seems more and more like a hellscape. Why would anyone be happy about so much complexity, especially when consistency is already lacking.

  • @unicodefox
    @unicodefox Месяц назад

    11:34, and if you're already using Vite you'll know that doing a declare like this breaks the cmd/ctrl+click on an import to go to the imported file

  • @kleavenae
    @kleavenae Месяц назад +3

    I think TypeScript doing linter stuff is not a good direction. Why do we want to mix the type checker and the linter, these are two different things. In practice the most annoying thing about this, is during development or when you debug stuff, you don't necessarily want to immediately write fully correct code. This would not be an issue, because you just turn off the linter in these phases of development. But you need to run the TypeScript compiler, and if that throws linter errors, it's more inconvenient to disable certain checks.

    • @unicodefox
      @unicodefox Месяц назад +2

      IMO, Linters should focus on code readability and format, TypeScript should do more functionality checks

    • @FrederikSchumacher
      @FrederikSchumacher Месяц назад

      On one hand, I'd agree with you because Go having gofmt (which sucks). On the other hand TypeScript is really a JavaScript linter in the first place, with some "code restructuring" capabilities. You can say it compiles, they can call it a compiler, but it doesn't compile the same way any other language compiles...

  • @vitalysuper3193
    @vitalysuper3193 Месяц назад +10

    Every title on this channel: this release is wild (no sorry its not)

  • @MartinThePooh
    @MartinThePooh 20 дней назад

    i mean, cool thing, the territorial file checking, and cool thing there is an actula example with 53K lines, but for a 'normal' project, i feel like files simply shall not be so big and unreadable (exceptions apply ofc) - i'd be just worried with this feature being publicly available, more unreadable shitty code would be published with the justification "it is basically encouraged by TS itself thx to this territorial thingy"

  • @RealRatchet
    @RealRatchet Месяц назад +1

    I like reduce, I use reduce, reduce is just fold by another name from other languages.

    • @LutherDePapier
      @LutherDePapier Месяц назад

      I love reduce now that I know how to use it.

  • @re.liable
    @re.liable Месяц назад

    TIL about those iterator helpers. I love generators. I used them a lot in Python. But I haven't been able to use them comfortably in JS

  • @Kitulous
    @Kitulous Месяц назад +2

    5:53 iirc ecmascript already made some awkward names for some methods because the logical names were already taken by some libraries. i can't recall any example, but I certainly remember that being the case. so why they didn't do the same thing here and left TS types be as they are and name the JS type something else?

    • @azizsafudin
      @azizsafudin Месяц назад

      MooTools

    • @DanielCouper-vf5zh
      @DanielCouper-vf5zh Месяц назад

      "flat" instead of "flatten" is the one you're thinking of, I suspect

  • @xpertdbx
    @xpertdbx Месяц назад

    So we can finally update to Typescript 3.4

  • @Oler-yx7xj
    @Oler-yx7xj Месяц назад +2

    0:30 is just Perl code

  • @PetriJohanLast
    @PetriJohanLast Месяц назад +1

    15:23 TypoScript

  • @v1Broadcaster
    @v1Broadcaster 28 дней назад

    long live flow

  • @tacochub4353
    @tacochub4353 Месяц назад +4

    These updates are neat... sure, but I don't really see how these methods solve the plethora of issues with using TypeScript.
    All they seem to do is add unnecessary complexity to an already perplexing ecosystem filled with syntactical nuances.

  • @IvanKravarscan
    @IvanKravarscan Месяц назад +1

    For of pattern? It's just a loop, a foreach loop as it is called in normal languages.

    • @LutherDePapier
      @LutherDePapier Месяц назад

      There's already a .forEach in Javascript. For of is different.

  • @universe_decoded797
    @universe_decoded797 Месяц назад +8

    Typescript solving things that are not problems to create more problems is problematic. ‘Simple things are hard to create’ is a true statement.

  • @kaaaxcreators
    @kaaaxcreators Месяц назад +1

    Whats the problem with reduce

  • @harou22
    @harou22 Месяц назад

    I guess this is bit of a hot take, but the fact that so many new native APIs in JavaScript return Iterators instead of Arrays is horrible DX. 99.9% of time the memory/lazyeval optimization is inconsequential, and the moment you need to iterate over all items the performance is worse than just working with arrays. Adding all the array methods on Iterator is just solving a problem we didn't have to have in the first place. There should be a way to get an iterator in case you happen to be working with huge dataset, but not as a default - I really don't need it when trying to get my 10 keys in a Map.

  • @adityatechnology9014
    @adityatechnology9014 Месяц назад

    In our college days, i had a friend who used to sit in the corner of tea shop, watched carefully every person and passing comment like - ohh my god 😮 she looks so gorgeous❤, he is very dirty today, his shirt is so silky and so on...
    I found most of the video like that.

  • @FrederikSchumacher
    @FrederikSchumacher Месяц назад +1

    The "reduce" thing is weird. Reduce is nothing great, nothing special, nothing terrible. It's part of an extremely common pattern and technique "Map-Reduce". That's like taking a cheap shot at the division operator...

  • @xabhax
    @xabhax Месяц назад

    Riveting content as always. Best every i would say. Also your expressions, top notch. Everyone else should just give up and let you read everything.

  • @ReinPetersen
    @ReinPetersen 24 дня назад

    i'm not so happy about disallow nullish truthy checks - will break *alot* of code

  • @abc123evoturbobonker
    @abc123evoturbobonker Месяц назад +2

    I feel like if you code TS then these are issues, if you code JS these are skill issues, weird mistakes cos you're not thinking and expecting a superset to save you... its Superman, maaaaaan

  • @picklenickil
    @picklenickil Месяц назад

    Correct me if i am wrong but, weren't this supposed to be just training wheels for newbiesJsDevs? You like putting turbochargers on tricycles of kids now?
    I never understood the need of it. But then I began with C.. 😂😂 in 2007.. so maybe im wrong

  • @dzienisz
    @dzienisz Месяц назад

    When typescript will be a finished product? They always fix bugs.

  • @2gbeh
    @2gbeh Месяц назад

    So basically NOT WILD

  • @LutherDePapier
    @LutherDePapier Месяц назад

    Where does the hate on reduce comes from?

  • @DavidAlsh
    @DavidAlsh Месяц назад +2

    I really want Rust macros in TypeScript

    • @everyhandletaken
      @everyhandletaken Месяц назад +5

      +1 for pattern matching
      +1000 for option types & result types

    • @vitalysuper3193
      @vitalysuper3193 Месяц назад +1

      No worries, you will never get it as it the most requested feature since first release, we don’t even have a way to type exceptions

  • @akam9919
    @akam9919 Месяц назад

    I'd rather typescript allow us to do a typeof on the variable we're typing and pass it as a generic to that than care about have typescript pretend to be eslint.

  • @jameshickman5401
    @jameshickman5401 Месяц назад

    Emoji variable names? You sicko!😅

  • @deadchannel8431
    @deadchannel8431 Месяц назад +2

    you're the porter robinson of web dev

    • @vrzlev
      @vrzlev Месяц назад +1

      is that good or bad?

    • @unicodefox
      @unicodefox Месяц назад +1

      how do you do code?
      well it's easy
      you just face your tserrors
      and become your hero's
      i don't understand why you're checking out detached head

    • @deadchannel8431
      @deadchannel8431 Месяц назад

      @@vrzlev well I like porter robinson

    • @hamm8934
      @hamm8934 Месяц назад

      He is no where near as authentic as porter. I really dont see this comparison

    • @unicodefox
      @unicodefox Месяц назад

      @@hamm8934 i think the joke is he mildly looks like him

  • @ChimbzZ
    @ChimbzZ Месяц назад +1

    Dude let your natural hair color grow. Imho, it's time to move on 😅

  • @6little6fang6
    @6little6fang6 Месяц назад

    1

  • @ChadcholMeesaeng
    @ChadcholMeesaeng Месяц назад

    if typscript have --nocheck. Why didn't we write .js instead. That's pure --nocheck. Pretty redundant to me.

  • @HMan2828
    @HMan2828 Месяц назад +1

    I'm a C# dev by trade, with background in many older languages (BASIC, Pascal, Fortran, etc).. I work mostly on enterprise software, and only occasionally do web apps. I know enough JS and jQuery to be able build a pretty complex web app by myself (for example a quote entry system, with many product configurators, with everything integrated into an ERP on the backend). I consider myself a full stack dev.
    I just do not see the point of TypeScript. I mean I understand how it's better than JS, but since I already know JS, I don't see the point of learning and using typescript. It's just a language extension. Everything get transpiled to JS anyway. I mean sure, you get the benefits of stronger typing, some bells and whistles that make writing JS less painful... But let's be honest, most of it is jQuery event handlers or tiny UI functions anyway, and my back end is in C#... What does TypeScript really do that couldn't be done by a syntax checking IDE for JS with good heuristics? I hear you types (pun intended) complain about useless abstraction all the time, how is typescript NOT just an abstraction layer for JS?

    • @jh0ker
      @jh0ker Месяц назад +8

      > But let's be honest, most of it is jQuery event handlers or tiny UI functions anyway, and my back end is in C#...
      Typescript is for people who build their whole app (or at least the entire front- or backend) in TS/JS. You are not the intended audience.

    • @HMan2828
      @HMan2828 Месяц назад

      ​@@jh0ker I guess not! lol Some new guy even tried to convince me last week to use vue for the front end of a new app we're planning for... I know I'm not up to date on the latest frameworks. I went, ok, show it to me... Proceeded into a 1 hour long meeting with him, with an open mind, and the more it went on the more I realized in my context, it's completely useless... All it does, Razor already does it better... Is it just me? What is the point of all those frameworks for a C# dev? Especially now that Blazor is out, why would I want to subject myself to learning them, when I can just write C# for the entire thing? What am I missing out on?

    • @RuanStrydom
      @RuanStrydom Месяц назад +2

      It doesn't matter how crappy your language/ui framework is. Being able to use the same language in FE and BE has enormous benefits. I'm not a typescript dev, but I've written some stuff in it. It's a fantastic language with a powerful type-system.

    • @HMan2828
      @HMan2828 Месяц назад

      @@RuanStrydom I agree, Blazor is great! :)

    • @caseyspaulding
      @caseyspaulding Месяц назад

      @@HMan2828large community, libraries, faster ui

  • @taylorswe
    @taylorswe Месяц назад +2

    Last

  • @WlodekM3
    @WlodekM3 Месяц назад +1

    First

  • @runejensen3978
    @runejensen3978 Месяц назад

    TS is that weird uncle which touches your kids wrongly. ugh.... next, it will be called "Internet Explorer"

  • @GGGGGGGGGG96
    @GGGGGGGGGG96 Месяц назад

    first? 😀

  • @tichopad
    @tichopad Месяц назад +1

    --noCheck with --watch is going to be big for DX in private monorepos