8
neeno
4y

Can we please stop making everything in javascript? Pretty please?

Like, I get it, js makes it easier to find developers and speeds up development, but writing a compiler to run on node? That doesn't make any sense to me. Typescript is taking ~11s to compile a medium-sized project, out of which ~9s are just type-checking (if I disable type-checking it takes ~2s to compile). Even Rust, which is considered to have a slow compiler (because of the borrow checker I assume) takes less time to compile a project of roughly the same size.

This is getting very irritating. If I want to keep type-checking, every single time I make a change on a single file I have to wait 11s before any tests start running. This was heavily affecting my productivity (and sanity), so I decided to disable type-checking and threw out the window 90% of Typescript's advantages.

Why the hell wasn't typescript written in an actually performant language? Just so you could say that typescript is written in itself? I don't get it, I really don't.

Comments
  • 2
    Idk about your project but we rewrote our base from Kotlin to TS.

    Kotlin took 50s compiling, 1.5minutes to boot up.

    Now, compiling takes 10s and 1~2seconds booting up. Incremental build take <3s.

    And and it actually includes more features than the springboot shiz nd request times are also drastically lowered.

    But maybe our Kotlin expert isn’t an expert, idk.
  • 0
    @momad my goodness this seems awesome, I'll definitely give it a try

    EDIT: oh it doesn't do any type checking, nevermind...
  • 0
    Sorry nope.
  • 1
    @N00bPancakes 🤬🤬🤬
  • 1
    What setup ?

    I have more than 1000 TypeScript files, some of them more than 3k lines long.

    Full compile takes 20 seconds.

    Changing just 1 file is instant (If you don't change external and publick references).

    Make more private methods !
  • 1
    ReasonML might be worth checking, type checking from the ocaml world, fast (in my machine) and performant. BUT i have not used it for anything big. Amd what about Flow JS? might be worth checking.

    TS is kinda slow in the transpiliation steps for me as well
  • 0
    @AleCx04 well, it does have a rather complicated type system...
  • 1
    I fucking hate when webdevs shit on C++ or Rust for bad compile times, then use their massive fucking bundles of TS and garbage frameworks that take half hour to compile too.
  • 0
    @petergriffin 1.5min to boot is not a language problem it's some other shit.
  • 0
    @hjk101 Yes, it’s a Framework problem, or incompetent devs. But afaik, we did everything how springboot would expect us to do things.
  • 4
    Here's the dirty little secret: modern tooling is getting WORSE, not better. The problem is that you only see it if you've been in the game long enough, and a large chunk of the people who think all this new stuff is great haven't been. They see TS vs. JS in a myopic way and say it's better - and they're probably even right to the degree they're talking about - but they don't see anything that came before and the ways in which it's not as good. Ah well, is what it is.
  • 0
    @NoToJavaScript Nest project, tests are run with Jest and ts-jest. Idk the configs though, too lazy to check them right now

    Oh and I have an i7-4790 and 16GB of ram, more than enough. I'm also on linux.
  • 0
    @AleCx04 would love to, but it's not my project, it's work stuff :/
  • 0
    @petergriffin what's the ratio from ❤️s to seconds?
Add Comment