from Hacker News

A 10x Faster TypeScript

by DanRosenwasser on 3/11/25, 2:32 PM with 908 comments

  • by DanRosenwasser on 3/11/25, 2:39 PM

    Hi folks, Daniel Rosenwasser from the TypeScript team here. We're obviously very excited to announce this! RyanCavanaugh (our dev lead) and I are around to answer any quick questions you might have. You can also tune in to the Discord AMA mentioned in the blog this upcoming Thursday.
  • by bcherny on 3/11/25, 2:45 PM

    Fast dev tools are awesome and I am glad the TS team is thinking deeply about dev experience, as always!

    One trade off is if the code for TS is no longer written in TS, that means the core team won’t be dogfooding TS day in and day out anymore, which might hurt devx in the long run. This is one of the failure modes that hurt Flow (written in OCaml), IMO. Curious how the team is thinking about this.

  • by zoogeny on 3/11/25, 4:25 PM

    I notice this time and time again: projects start with a flexible scripting language and a promise that the performance will be sufficient. I mean, JS is pretty performant as scripting languages go and it is hard to think of any language runtimes that get more attention than the browser VMs. And generally, 90% of the things people do will run sufficiently fast in that VM.

    Yet projects inevitably get to the stage where a more native representation wins out. I mean, I can't think of a time a high profile project written in a lower level representation got ported to a higher level language.

    It makes me think I should be starting any project I have in the lowest level representation that allows me some ergonomics. Maybe more reason to lean into Zig? I don't mean for places where something like Rust would be appropriate. I mean for anything I would consider using a "good enough" scripting language.

    It honestly has me questioning my default assumption to use JS runtimes on the server (e.g. Node, deno, bun). I mean, the benefit of using the same code on the server/client has rarely if ever been a significant contributor to project maintainability for me. And it isn't that hard these days to spin up a web server with simple routing, database connectivity, etc. in pretty much any language including Zig or Go. And with LLMs and language servers, there is decreasing utility in familiarity with a language to be productive.

    It feels like the advantages of scripting languages are being eroded away. If I am planning a career "vibe coding" or prompt engineering my way into the future, I wonder how reasonable it would be to assume I'll be doing it to generate lower level code rather than scripts.

  • by kevlened on 3/11/25, 5:41 PM

    For previous attempts at a faster tsc, but in rust, see:

    1. https://github.com/dudykr/stc - Abandoned (https://github.com/swc-project/swc/issues/571#issuecomment-1...)

    2. https://github.com/kaleidawave/ezno - In active development. Does not have the goal of 1:1 parity to tsc.

  • by pjmlp on 3/11/25, 2:51 PM

    Even though I have my considerations regarding Go, I love that they picked Go instead of the fashion to go Rust that seems to be the norm now.

    A compiled managed language is much better approach for userspace applications.

    Pity that they didn't go with AOT compiled .NET, though.

  • by wesbos on 3/11/25, 2:56 PM

    We had Daniel and Anders on the podcast to talk about the how and why of the native port if anyone is looking for an in-depth discussion → https://www.youtube.com/watch?v=ZlGza4oIleY
  • by grantwu on 3/11/25, 3:01 PM

    > By far the most important aspect is that we need to keep the new codebase as compatible as possible, both in terms of semantics and in terms of code structure. We expect to maintain both codebases for quite some time going forward. Languages that allow for a structurally similar codebase offer a significant boon for anyone making code changes because we can easily port changes between the two codebases. In contrast, languages that require fundamental rethinking of memory management, mutation, data structuring, polymorphism, laziness, etc., might be a better fit for a ground-up rewrite, but we're undertaking this more as a port that maintains the existing behavior and critical optimizations we've built into the language. Idiomatic Go strongly resembles the existing coding patterns of the TypeScript codebase, which makes this porting effort much more tractable.

    --https://github.com/microsoft/typescript-go/discussions/411

    I haven't looked at the tsc codebase. I do currently use Golang at my job and have used TypeScript at a previous job several years ago.

    I'm surprised to hear that idiomatic Golang resembles the existing coding patterns of the tsc codebase. I've never felt that idiomatic code in Golang resembled idiomatic code in TypeScript. Notably, sum types are commonly called out as something especially useful in writing compilers, and when I've wanted them in Golang I've struggled to replace them.

    Is there something special about the existing tsc codebase, or does the statement about idiomatic Golang resembling the existing codebase something you could say about most TypeScript codebases?

  • by dimgl on 3/11/25, 3:42 PM

    I'm really surprised by this visceral reaction to not choosing Rust. Go is a great language and I'd choose it for a majority of projects over Rust just based off of the simplicity of the language and the ability to spin up developers on it quickly. Microsoft is a big corporation.

    Why _not_ use Go?

  • by 0xcb0 on 3/11/25, 3:30 PM

    After years of PHP, I came to typescript nearly 4 years ago (for web front and backend development). All I can say is that I really enjoy using this programming language. The type system is just about enough to be helpful, and not too much to be in your way. Compiling the codebase is quite fast, compared to other languages. With a 10x, it will be so much fun to code.

    Never been a big fan of MS, but must say that typescript is well done imho. thanks for it and all the hard work!

  • by dustedcodes on 3/11/25, 5:40 PM

    Meanwhile .NET developers are still waiting for Microsoft to use their own "inventions" like Blazor, .NET MAUI, Aspire, etc. for anything meaningful. Bless them.
  • by zestyping on 3/12/25, 12:40 AM

    That's a pretty misleading clickbait title. TypeScript isn't getting 10x faster; the TypeScript compiler is getting 10x faster.

    I would argue it needs editing, as it violates the HN guideline:

    > use the original title, unless it is misleading or linkbait; don't editorialize.

  • by haxiomic on 3/11/25, 5:58 PM

    Sounds like they're automatically generating Go code from ts in some amount [0]. I wonder if they will open the transpilation effort, in this way you'd create a path for other TypeScript projects to generate fast native binaries

    Opened discussion [1]

    - [0] https://github.com/microsoft/typescript-go/discussions/410

    - [1] https://github.com/microsoft/typescript-go/discussions/467

  • by adriancooney on 3/11/25, 3:10 PM

    I know this is a port but I really hope the team builds in performance debugging tools from the outset. Being able to understand _why_ a build or typecheck is taking so long is sorely missing from today's Typescript.
  • by aib on 3/12/25, 6:56 AM

    Just tried it on our codebase. Getting over a thousand errors, a good portion of which seem to be:

        ../../../tmp/typescript-go/built/local/lib.dom.d.ts:27982:6 - error TS2300: Duplicate identifier 'KeyType'.
        27982 type KeyType = "private" | "public" | "secret";
                   ~~~~~~~
    
          ../../../tmp/typescript-go/built/local/lib.webworker.d.ts:9370:6 - 'KeyType' was also declared here.
            9370 type KeyType = "private" | "public" | "secret";
                      ~~~~~~~
    
    Probably an easy fix.

    Running it in another portion results in SIGSEGV with a bad/nil pointer defererence, which puts me in the camp of people questioning the choice of Go.

  • by slackerIII on 3/11/25, 3:11 PM

    This is amazing. Everyone that picked TS for a big project was effectively betting that someone would do this at some point, so it's incredible to see it finally happen. Thanks to everyone involved!
  • by electroly on 3/11/25, 2:52 PM

    I wonder, for a Microsoft project, why not C#? Would have been a nice win for the home team.
  • by DeathArrow on 3/12/25, 6:23 AM

    The news for me is Microsoft teams relying on Go.

    Strange choice to use Go for the compiler instead of C# or F#.

    Now if they will have problems, they will depend on the Go team at Google to fix them.

  • by stuaxo on 3/11/25, 6:14 PM

    I'd like to see if it makes a difference to the version of DOOM that runs in the TypeScript type system.

    https://news.ycombinator.com/item?id=43184291

    https://www.youtube.com/watch?v=0mCsluv5FXA

  • by robinsonrc on 3/11/25, 7:25 PM

    Sad to see them using Go and not Anders’s own language (Turbo Pascal 7) for this
  • by ethan_smith on 3/11/25, 3:35 PM

    Wow, this is huge! A 10x speedup is going to be game-changing for large TypeScript codebases like ours. I've been waiting for something like this - my team's project takes forever to typecheck on CI and slows down our IDE.

    Hopefully this would also reduce the memory footprint because my VS Code intelisense keeps crashing unless I give it like 70% of my RAM, its probably because of our fairly large graphql.ts file which contains auto-generated grapqhl types.

  • by tracker1 on 3/11/25, 7:23 PM

    Given the direction and efforts into projects like rspack, rolldown, etc. Why were they not considered as possible collaboration projects or integrations for this?

    This isn't a knock against Go or necessarily a promotion of Rust, just seems like a lot of duplicated effort. I don't know the timelines in place or where the community projects were vs. the internal MS project.

  • by hamandcheese on 3/11/25, 8:17 PM

    I love all this native tooling for JS making things faster.

    I kinda wonder, though, if in 5 or 10 years how many of these tools will still be crazy fast. Hopefully all of them! But I also would not be surprised if this new performance headroom is eaten away over time until things become only just bearable again (which is how I would describe the current performance of typescript).

  • by eapriv on 3/11/25, 2:53 PM

    It’s not obvious from the text, but the compiler was previously written in TypeScript (which was kind of a strange choice for the language to write a compiler in).
  • by cjbgkagh on 3/11/25, 4:44 PM

    My read on why Go and not AOT C# is it would be more difficult to get a C# programmers to give up idiomatic OOP in C# than it would be to get C# programmers to switch to Go. Go is being used as a forcing function to push dev cultural change. This wouldn't generalize to teams that have other ways of dealing with cultural change.
  • by joewood1972 on 3/11/25, 2:50 PM

    One question that springs to mind is the in-browser "playground" and hosted coding use-case. I assume WASM will be used in that scenario. I'm wondering what the overhead is there.
  • by goda90 on 3/11/25, 11:54 PM

    This will be very welcome. I've been working on refactoring very large Typescript files in a very large solution in VS2022. Sometimes it gets into a state where just editing the code or copy/pasting causes it to hang for a few seconds and the fans on my workstation to take off like a jet engine. The typing advantages my team has gotten from migrating our codebase to Typescript has been invaluable, but the performance implications really hurt.
  • by steve_adams_86 on 3/11/25, 2:56 PM

    Syntax podcast has a conversation with Anders and Dan about it here: https://www.youtube.com/watch?v=ZlGza4oIleY&t=1s
  • by maginx on 3/13/25, 7:43 PM

    I'm curious about the 10x via implementation in Go - couldn't it have been realized otherwise? Finding the hotspots, reimplementing them using better algorithms, if necessary move a few critical paths to native etc. Or even improving the JIT itself which might benefit all programs. Just wondering because I wouldn't think that the JIT-overhead was that much that you could gain 10x just reimplementing in Go (or C, assembly etc)... that is something I would only have expected if going from an interpreted context.
  • by CLiED on 3/11/25, 9:25 PM

    Few things are more Microsofty than a team reaching over to a competitor's language instead of using their own and to boot none of the reasons given so far seem credible, good job to the team nonetheless.
  • by whoknowsidont on 3/12/25, 6:32 PM

    I'm glad the team was able to pick something because it was a good fit for them and their goals, and not because of perception or love of some tech-stack.

    Programming languages are tools. Nothing more.

  • by synergy20 on 3/11/25, 9:21 PM

    In Golang, wow. That gives me more confidence to adopt Go in projects.
  • by zombot on 3/12/25, 2:00 PM

    No, it's not TypeScript that is 10 times as fast, only the TypeScript compiler. Bad title. Also, "10x faster" would be a factor of 11.
  • by presentation on 3/11/25, 2:46 PM

    Ive been dreaming about this for years! Never been so pumped.
  • by DanielHB on 3/11/25, 4:17 PM

    Any plans for a AOT version of Typescript with strict typing that targets WASM or LLVM?
  • by odyssey7 on 3/11/25, 6:59 PM

    The key:

    > immutable data structures --> "we are fully concurrent, because these are what I often call embarrassingly parallelizable problems"

    The relationship of their performance gains to functional programming ideas is explained beginning at 8:14 https://youtu.be/pNlq-EVld70?feature=shared&t=522

  • by trashface on 3/11/25, 5:27 PM

    I can see why they didn't use Rust, I've written little languages in that myself, so I know what is involved, even though I like the language a lot. But I'm quite surprised they didn't use C#. I would have thought ahead-of-time optimized C# would give nearly the same compilation speed as Go. They do seem to be leaning into concurrency a lot so maybe its more about Go's implementation of that (CSP-like), but doesn't .Net have a near-equivalent to that? Have not used it in a while.

    Also I get the sense from the video that it still outputs only JS. It would be nice if we could build typescript executables that didn't require that, even if was just WASM, though that is more of a different backend rather than a different compiler.

    Edit: C# was addressed: https://github.com/microsoft/typescript-go/discussions/411#d...

  • by register on 3/11/25, 4:24 PM

    I really wonder why this project have not been developed in .NET core. I would have then been possible to embed this in .NET projects increasing the available number of libraries in the ecosystem. Also it woul have leverages .NET GC which is better than Go. Rewriting in Go really doesn't make sense to me.
  • by gwbas1c on 3/11/25, 5:10 PM

    This is frustrating:

    > The JS-based codebase will continue development into the 6.x series, and TypeScript 6.0 will introduce some deprecations and breaking changes to align with the upcoming native codebase.

    > While some projects may be able to switch to TypeScript 7 upon release, others may depend on certain API features, legacy configurations, or other constraints that necessitate using TypeScript 6. Recognizing TypeScript’s critical role in the JS development ecosystem, we’ll still be maintaining the JS codebase in the 6.x line until TypeScript 7+ reaches sufficient maturity and adoption.

    It sounds like the Python 2 -> 3 migration, or the .Net Framework 4 -> .Net 5 (.Net Core) migration.

    I'm still in a multi-year project to upgrade past .Net Framework 4; so I can certainly empathize with anyone who gets stuck on TS 6 for an extended period of time.

  • by paxys on 3/11/25, 8:11 PM

    Faster compilation is great, but what I'm really excited for is a faster TS Language Server. Being able to get autocomplete hints, hover info, goto definition, error squiggles and more anything close to 10x faster is going to be revolutionary when working in large TS codebases.
  • by melodyogonna on 3/11/25, 4:46 PM

    Oh man, this is great. I've been having performance issues with TSC for language services.

    My theory - that Go will always be the choice for things like this when ease, simplicity, and good (but not absolute) performance is the goal - continues to hold.

  • by alberth on 3/11/25, 4:31 PM

    Dumb question: is this a 10x speed up in the run-time of TypeScript ... or just the build tooling?

    And if it's run-time, can we expect browsers to replace V8 with this Go library?

    (I realize this is a noob/naive question - apologies)

  • by umvi on 3/11/25, 6:02 PM

    This is great news. We actually use esbuild most of the time to transpile TS files because tsc is so slow (and only run tsc in CI/CD pipelines). Coincidentally, esbuild is also golang
  • by stef-13013 on 3/12/25, 10:47 AM

    The main problem is that AOT C# is not as mature on platforms other than Windows, if that.

    So, to me, Hejlsberg's choice sounds pretty logical.

    After, why go ? why not...

  • by skwee357 on 3/11/25, 9:38 PM

    “Developers rewrite tools from dynamic language to statically compiled one - improves performance by 10x”

    Also, what’s up with 10x everywhere? Why not 9.5x or 11x?

  • by vivzkestrel on 3/11/25, 2:56 PM

    Has there been any talks/progress on native inclusion of typescript for type checking, for path resolution with node.js without using tsc, ts-node, tsx, native vscode TS debugging and testing support? We are 22 versions down on node.js and still the support seems to be limited at best. Is it possible to maybe share a roadmap of what is being done in this territory
  • by nailer on 3/11/25, 5:37 PM

    Keep in mind most apps made in frameworks aren't using `tsc` but rather existing tools like `esbuild` which are native binaries.
  • by aiiizzz on 3/11/25, 5:58 PM

    So is the language server still not going to match lsp spec? Even though it's getting a complete rewrite?
  • by localghost3000 on 3/11/25, 4:04 PM

    Something that kind of got understated in here IMO is the improved refactoring and code intelligence that this will unlock. Very exciting! I am looking forward to all the new tooling and frameworks that come out of this change. TS is already an amazing language and just keeps getting better!
  • by NiloCK on 3/12/25, 12:13 PM

    One outsized impact of this is going to be on agentic LLM programming workflows, where compile and test time are trending toward being the dominant bottlenecks.

    See how many spaghetti types get churned through this faster transpiler.

    Didn't expect Jevons paradox popping up for compilers.

  • by jujadjwdfs on 3/12/25, 2:54 AM

    Not sure if this point was brought up but I think it's worth considering.

    If the Typescript team were to go with Rust or C# they would have to contend with async/await decoration and worry about starvation and monopolization.

    Go frees the developer from worrying about these concerns.

  • by sublinear on 3/12/25, 5:49 AM

    Typescript compiles to javascript, so does this not prove what people have been screaming from the rooftops for so long that there's a significant performance penalty with typescript for almost no actual benefit?
  • by tomatofrank on 3/11/25, 7:22 PM

    Very pumped to see how this improves the experience in VSCode.

    I've been revisiting my editing setup over the last 6 months and to my surprise I've time traveled back to 2012 and am once again really enjoying Sublime Text. It's still by far the most performant editor out there, on account of the custom UI toolkit and all the incredibly fast indexing/search/editing engines (everything's native).

    Not sure how this announcement impacts VSCode's UI being powered by Electron, but having the indexing/search/editing engines implemented in Go should drastically improve my experience. The editor will never be as fast as Sublime but if they can make it fast enough to where I don't notice the indexing/search/editing lag in large projects/files, I'd probably switch back.

  • by wodenokoto on 3/12/25, 6:18 AM

    So the end goal is that I can write a typescript application and deploy an executable to my server? Or is it just to deliver faster versions of typescript tools and MS developed typescript applications?
  • by srott on 3/11/25, 10:47 PM

    Funny, until now I always thought that TypeScript is JavaScript with some C# vibes

    https://news.ycombinator.com/item?id=43320086

  • by dimitropoulos on 3/11/25, 2:38 PM

    yes, this will definitely vastly increase the Doom fps, haha (I’m the guy that did that project). But I think there’s a lot more to it than that.

    tl;dr — Rust would be great for a rewrite, but Go makes way more sense for a port. After the dust settles, I hope people focus on the outcomes, not the language choice.

    I was very surprised to see that the TypeScript team didn’t choose Rust, not just because it seemed like an obvious technical choice but because the whole ecosystem is clearly converging on Rust _right now_ and has been for a while. I write Rust for my day job and I absolutely love Rust. TypeScript will always have such a special place in my heart but for years now, when I can use Rust.. I use Rust. But it makes a lot of sense to pick Go.

    The key “reading between the lines” from the announcement is that they’re doing a port not a rewrite. That’s a very big difference on a complex project with 100-man-years poured into it.

    Places where Go is a better fit than Rust when porting JavaScript:

    - Go, like JavaScript and unlike Rust, is garbage collected. The TypeScript compiler relies on garbage collection in multiple places, and there are probably more that do but no one realizes it. It would be dangerous and very risky to attempt to unwind all of that. If it were a Rust rewrite, this problem goes away, but they’re not doing a rewrite.

    - Rust is so stupidly hard. I repeat, I love Rust. Love it. But damn. Sometimes it feels like the Rust language actively makes decisions that demolish the DX of the 99.99% use-case if there’s a 0.001% use-case that would be slightly more correct. Go is such a dream compared to Rust in this respect. I know people that more-or-less learned Go in a weekend and are writing it professionally daily. I also know people that have been writing Rust every day professionally for years and say they still feel like noobs. It’s undeniable what a difference this makes on productivity for some teams.

    Places where Go is just as good a fit as Rust:

    - Go and Rust both have great parallelism/concurrency support. Go supports both shared memory (with explicit synchronization) and message-passing concurrency (via goroutines & channels). In JavaScript, multi-threading requires IPC with WebWorkers, making Go’s concurrency model a smoother fit for porting a JS-heavy codebase that assumes implicit shared state. Rust enforces strict ownership rules that disallows shared state, or we can at least say makes it a lot harder (by design, admittedly).

    - Go and Rust both have great tooling. Sure, there are so many Rust JavaScript tools, but esbuild definitively proves that Go tooling can work. Heck, the TypeScript project itself uses esbuild today.

    - Go and Rust are both memory safe.

    - Go and Rust have lots of “zero (or near zero) cost abstractions” in their language surface. The current TypeScript compiler codebase makes great use of TypeScript enums for bit fiddling and packing boolean flags into a single int32. It sucks to deal with (especially with a Node debugger attached to the TypeScript typechecker). While Go structs are not literally zero cost, they’re going to be SO MUCH nicer than JavaScript objects for a use-case like this that’s so common in the current codebase. I think Rust sorta wins when it comes to plentiful abstractions, but Go has more than enough to make a huge impact.

    Places where Rust wins:

    - the Rust type system. no contest. In fairness, Go doesn’t try to have a fancy type system. It makes up for a lot of the DX I complained about above. When you get an error that something won’t compile, but only when targeting Windows because Rust understands the difference in file permissions… wow. But clearly, what Go has is good enough.

    - so many new tools (basically, all of them that are not also in JS) are being done in Rust now. The alignment on this would have been cool. But hey, maybe this will force the bindings to be high-quality which benefits lots of other languages too (Zig type emitter, anyone?!).

    By this time next week when the shock wears off, I just really hope what people focus on is that our TypeScript type checking is about to get 10 times faster. That’s such a big deal. I can’t even put it into words. I hope the TypeScript team is ready to be bombarded by people trying to use this TODAY despite them saying it’s just a preview, because there are some companies that are absolutely desperate to improve their editor perf and un-bottleneck their CI. I hope people recognize what a big move this is by the TypeScript team to set the project up for success for the next dozen years. Fully ejecting from being a self-hosted language is a BIG and unprecedented move!

  • by massive-fail on 3/11/25, 7:17 PM

    Typescript was the best thing that ever happened to the web! Thanks Daniel, Ryan and Anders and the rest of the team for making development great for over 10 years! This improvement is amazing!
  • by dev1ycan on 3/11/25, 4:04 PM

    Typescript is a nice programming language, Javascript is not, I am glad
  • by darthrupert on 3/11/25, 5:56 PM

    This kinda begs the question: should we port all backend Typescript code to Go (or Rust) to get a similar runtime performance improvement? Is Typescript generally this inefficient?
  • by jbverschoor on 3/11/25, 2:58 PM

    Performance is a feature
  • by subarctic on 3/11/25, 5:23 PM

    One question I'm surprised isn't discussed here is how much AI code generation was used in this port. It seems like the perfect use case for it.
  • by g0ld3nrati0 on 3/11/25, 7:59 PM

    Will TS v7 only support erasable syntax? e.g. no enums?
  • by accassar on 3/11/25, 11:53 PM

    What percentage of the new code was written by an LLM?
  • by garbagepatch on 3/11/25, 4:49 PM

    What do they mean by improving editor startup time? Does the editor (I assume vscode?) run the compiler as part of the startup? Why?
  • by kopirgan on 3/11/25, 3:37 PM

    Interesting Microsoft using Golang for this!
  • by neycoda on 3/11/25, 11:19 PM

    Once people figure out how much faster their apps will be, they'll add enough features to slow it down again.
  • by aklein on 3/11/25, 6:50 PM

    Can’t wait for a better TSC Doom framerate.
  • by dlahoda on 3/12/25, 11:50 AM

    imho main reason for go is big pool of engineers to hire who have read this book set https://compilerbook.com/

    as i see next planned feature is macro in TS(joke, just because 3rd book is macro).

  • by Ericson2314 on 3/12/25, 3:47 AM

    It should be in OCaml. This is why I think OCaml should be compilable to the Go runtime/ABI.
  • by Traubenfuchs on 3/11/25, 7:39 PM

    I wonder how much that would have helped the guy who implemented Doom in TS types only.
  • by sesm on 3/11/25, 4:44 PM

    Kinda shows that there is no practical ML-family language with good concurrency support.
  • by deskr on 3/11/25, 6:16 PM

    I'm sold.

    I'll give Typescript yet another go. I really like it and wish I could use it. It's just that any project I start, inevitably the sourcemap chain will go wrong and I lose the ability to run the debugger in any meaningful way.

  • by pizlonator on 3/11/25, 3:32 PM

    Misleading title. TypeScript isn't getting 10x faster. The compiler is 10x faster.
  • by thund on 3/11/25, 2:55 PM

    Too bad they didn’t choose Rust, would have loved contributing (not picking up Go, sry)
  • by gqgs on 3/12/25, 5:25 AM

    I guess this helps explain why Microsoft has their own fork on the Go language.
  • by lxe on 3/11/25, 5:55 PM

    Why not just work with the SWC folks and get the Rust implementation mainlined?
  • by reverseblade2 on 3/11/25, 4:09 PM

    Just use fable and F# instead, your code transpiles to python and rust too
  • by falleng0d on 3/11/25, 7:00 PM

    I wonder how much faster DOOM will run on this
  • by DrBenCarson on 3/11/25, 4:49 PM

    I get that the choice was well thought out, but it would have been nice to use the same language as most of the modern tools (Rust)

    Do any other well-adopted tools in the ecosystem use Go?

  • by zerr on 3/11/25, 4:09 PM

    Use browser and web for websites, not applications. For apps, create native downloadable desktop software, which also work offline.
  • by emcell on 3/11/25, 6:46 PM

    this is huge! thank you!
  • by algorithmsRcool on 3/11/25, 2:56 PM

    I am actually shocked that Anders chose Go over C# for this port.
  • by alexisread on 3/11/25, 8:56 PM

    1ct5 44t t5
  • by _benton on 3/11/25, 4:58 PM

    > ctrl-f "rust" > 93 matches

    sigh

  • by singularity2001 on 3/11/25, 9:56 PM

    So now tsc is a binary, browsers can efficiently bundle it and compile index.ts on the fly ... please?
  • by arrty88 on 3/11/25, 11:12 PM

    Now make it executable in the go runtime please:)
  • by pseudopersonal on 3/11/25, 2:47 PM

    The post title is a bit misleading. It should say a 10x faster build time, or a 10x faster TypeScript compiler. tsc (compiler) is 10x faster, but not the final TS program runtime. Still an amazing feat! But doom will not run faster

    "To meet those goals, we’ve begun work on a native port of the TypeScript compiler and tools. The native implementation will drastically improve editor startup, reduce most build times by 10x, and substantially reduce memory usage."

  • by DrammBA on 3/11/25, 5:04 PM

    People seem very hurt that the creator of C# didn't pick C# for this very public project from a multi-trillion-dollar corp. I find it very refreshing, they defined logical requirements for what they wanted to do and chose Golang because it ticked more boxes than C#. This doesn't mean that C# sucks or that every C# project should switch to Golang, but there seems to be a very vocal minority affected by this logical decision.
  • by Starlord2048 on 3/11/25, 4:17 PM

    [flagged]
  • by osigurdson on 3/11/25, 10:57 PM

  • by ragnese on 3/11/25, 3:16 PM

    But, I was told that programming language choice doesn't matter and that I can write slow/bad code in any language...

    /s

  • by tosh on 3/11/25, 2:53 PM

    tl;dr: TypeScript compiler (!) was implemented in TypeScript, new one is in Go

    half of the perf gain is from moving to native code, other half is from concurrency

  • by 29athrowaway on 3/11/25, 10:29 PM

    tl;dr

    10x faster compilation, not runtime performance

  • by lawls on 3/11/25, 7:23 PM

    still javascript though
  • by Delomomonl on 3/11/25, 3:42 PM

    I don't get it.

    Why is typescript not already a standard natively supported by browers?!

  • by atak1 on 3/11/25, 4:52 PM

    Curious how this is going to affect Cursor - I'm assuming it'll just be a drop-in replacement and we can expect Cursor to get the same speed-up as VSCode.
  • by zidad on 3/11/25, 3:25 PM

    And the lesson is; don't build anything that needs to be performant in TypeScript because it's so slow?
  • by rvz on 3/11/25, 3:08 PM

    So in order to get "Faster TypeScript" you have to port the existing "transpiler" in a complied language that delivers said faster performance.

    This is an admission that these JavaScript based languages (including TypeScript) are just completely unsuitable for these performance and scalable situations, especially when the codebase scales.

    As long as it is a compiled language with reasonable performance and with proper memory management situations, Go is the unsurprising choice, but the wise choice to solve this problem.

    But this choice definitively shows (and as admitted by the TS team) how immature both JavaScript and TypeScript are in performance and scalability scenarios and should be absolutely avoided for building systems that need it. Especially in the backend.

    Just keep it in the frontend.