(Actually) Benchmarking TypeScript

Поділитися
Вставка
  • Опубліковано 21 гру 2023
  • ArkType's been up to some cool stuff for awhile, but attest takes it to a whole new level.
    Announcement tweet: / 1722640689136095643
    Github repo: github.com/arktypeio/arktype/...
    Check out my Twitch, Twitter, Discord more at t3.gg
    S/O Ph4se0n3 for the awesome edit 🙏
  • Наука та технологія

КОМЕНТАРІ • 41

  • @falxie_
    @falxie_ 7 місяців тому +168

    Nah I ain't writing tests for my types lol

    • @g-rexsaurus794
      @g-rexsaurus794 7 місяців тому

      lol

    • @ArcticPrimal
      @ArcticPrimal 7 місяців тому +8

      its taking things too far

    • @CrimsonBlazz
      @CrimsonBlazz 7 місяців тому +23

      "This isn't for everybody, I don't expect most developers even watching this to benefit from these tools."
      Theo mentioned this is expected

    • @yohendryy
      @yohendryy 7 місяців тому

      Amen

    • @alkolaqi83
      @alkolaqi83 7 місяців тому

      This is ridiculous

  • @FatahChan
    @FatahChan 7 місяців тому +20

    ohh the js world, we writing test for types now

  • @potatoscream
    @potatoscream 7 місяців тому +5

    As a TypeScript type-level dev, I very often write complex types and even tests for those types, but one thing I was missing all this time was performance tests. I'm so excited for this! I really hope in the near future they also release tools, or at least guidelines, to help you improve the performance, and not just test and monitor it.

  • @sp3ctum
    @sp3ctum 7 місяців тому +23

    This is great for library authors and those of us that need complex type logic!

  • @user-yw6nw8so2n
    @user-yw6nw8so2n 7 місяців тому +15

    one of those, "maybe I should reconsider my life choices" moments, when you are writing tests for your linter's fake types.
    (in all seriousness, I can see how some library devs might benefit from it)

    • @AbegazNap
      @AbegazNap 7 місяців тому

      I mean u are not wrong

  • @stevemelons
    @stevemelons 7 місяців тому +8

    lol never thought about this but it’s true. Large projects get so unbearably slow

  • @Exilum
    @Exilum 7 місяців тому +3

    I don't intend to use it but it's cool it exists, and I get why some people would want to use it.

  • @trapfethen
    @trapfethen 6 місяців тому

    For anyone Curious. Arktype is also compatible with JS and JSDoc if that is how you're doing your typing. It also supports both CommonJS and Ecma Modules out of the box so you can incorporate it into your old code-bases as well. Truly remarkable work

  • @user-lu1mk7mj1r
    @user-lu1mk7mj1r 5 місяців тому

    We have TypeScript to check types, so I think we need PerformanceScript to check performance!

  • @steele7220
    @steele7220 7 місяців тому +3

    TYPEBOX

  • @phlr
    @phlr 7 місяців тому +8

    So Theo hates unit tests but loves tests for types? 😂

    • @madmanali93
      @madmanali93 7 місяців тому +4

      I'm pretty sure he is for unit testing when it comes to libraries

  • @modolief
    @modolief 7 місяців тому +3

    Sorry, potentially naive question here, but if a developer has to go to _this much_ trouble to work with the type system don't we have to ask if choosing something built with types from the ground up, like Rust, wouldn't be a better career choice?

  • @mustafazakiassagaf1757
    @mustafazakiassagaf1757 7 місяців тому +26

    i used to think typescript lsp are slow. then i code rust

    • @no_name4796
      @no_name4796 7 місяців тому +4

      I never had problems with rust-analyzer tbh. Probably using neovim instead of a bloated ide also helps a lot

    • @mustafazakiassagaf1757
      @mustafazakiassagaf1757 7 місяців тому +3

      I'm using neovim too, the project that I'm on have lots of macro. rust analyzer usually takes more than one gigs and it frequently crash

    • @dealloc
      @dealloc 7 місяців тому +4

      Rust/Rust Analyzer only really becomes slow when you use a bunch of proc macros, because it has to build your code to expand the code in order to understand the types.

  • @rickdg
    @rickdg 7 місяців тому

    Typescript: I can fix him.

  • @codeChuck
    @codeChuck 3 місяці тому

    I do not know how to *correctly* write test for anything beyond a simple pure function using vitest or jest! You want we to write test for TYPES? :) Really, a video what should be tested and what shouldn't will be a good one! How to use this tool, ArkType? Theo, want to show us how you do this, e.g. with your UploadThing tRPC routes?

  • @John2202W
    @John2202W 7 місяців тому +1

    The way I have an M1 Max and the I still have to restart the TS language server every day

    • @toooes
      @toooes 7 місяців тому

      Fix TS-config

  • @ev3rybodygets177
    @ev3rybodygets177 7 місяців тому

    test for you types? from the guy on the never test train? Aint no way

  • @jacoblockwood4034
    @jacoblockwood4034 7 місяців тому

    FYI for people in the comments, this came out in November, the video is just coming out a bit late

  • @alexanderhuliakov6012
    @alexanderhuliakov6012 7 місяців тому +7

    This is one of reasons why I don't love typescript, we build shizo stuff to "fix" shizo stuff and it produces even more shizo stuff

  • @ithinkimhipster502
    @ithinkimhipster502 7 місяців тому +16

    If I have to write tests to ensure that he language itself is working, then Ive lost the plot

    • @mikopiko
      @mikopiko 7 місяців тому +4

      Exactly, having to write tests for the types itself means the types is unreliable which defeats the point of the types!

    • @RalfVogler
      @RalfVogler 6 місяців тому +1

      @@mikopiko You don't, it's a tool for lib devs to check speed. TS's type system isn't sound, but sound enough for what people are using it for.

  • @bchdev
    @bchdev 7 місяців тому

    1:22 It's not "at test" its "attest", pronounced "UH test", which means to affirm to be correct, true, or genuine.

  • @pinoniq
    @pinoniq 7 місяців тому +2

    Let's not forget Typescript is a Microsoft product. So it's going to be slow from the get-go

  • @vibonacci
    @vibonacci 7 місяців тому +5

    Why don't you just use a typed language if you want types from the get go? Problem solved. JS has no types, Typescript doesn't change that, it's a formatting tool.

    • @thomassynths
      @thomassynths 7 місяців тому +2

      You are factually incorrect. Typescript does add types and has a static type checker.

    • @RalfVogler
      @RalfVogler 6 місяців тому +1

      What are you even talking about? TS does static type checking, hence it's a typed language. The fact that it emits JS without this type information at runtime is a sep. issue. However, most typed languages do type erasure. No difference to e.g. using js_of_ocaml (besides having a sound type system :)).

  • @StephenRayner
    @StephenRayner 7 місяців тому

    Yo! My ts server dies all the time!!!!!

  • @hypnotico7051
    @hypnotico7051 7 місяців тому

    Is it just me, or has this channel become QVC for developer tools?