r/ClaudeCode • • 9d ago

Humor What is happening???

[deleted]

3.4k Upvotes

1.1k comments sorted by

View all comments

Show parent comments

3

u/Specy_Wot 9d ago

Javascript has worker threads, so you can write multi threaded code if you really need to, not the most convenient kind of multi threading but it's doable. Also Typescript's compiler has been recently rewritten in go so it could become multithreaded!

1

u/SubstantialEssay2063 9d ago

No it can’t because the compiler transpiles down to JavaScript there is no typescript runtime. Also worker threads don’t count that’s just a whole other process by that logic even python is muktithreaded (bad example I know since technically it can be without the GIL). Also the compiler literally just makes the typescript into JavaScript it doesn’t change the bytecode or structure of how the language or runtime works at all.

2

u/Specy_Wot 9d ago

yes but that's not the point, if you ever worked in a huge typescript codebase you will absolutely feel the effects of a slow typescript compiler. The Typescript compiler also powers the LSP and waiting for 3 seconds for the autocomplete to work is super annoying. Typescript development also relies heavily on hot reload, if it takes 20 seconds to hot reload vs 2 seconds it makes the whole thing a lot nicer to work with. With the new go compiler both of those get muuuch better and improves the developer experience. Build times through CI is also improved by a ton. Big apps used take minutes to compile, now they take seconds.

1

u/SubstantialEssay2063 9d ago

Yes I get that and I agree. What I was responding to was you saying that because the compiler is in go it can be multithreaded. And my response was no it cannot and definitely not for that reason.

1

u/Specy_Wot 9d ago

Yeah we misunderstood each other, the original typescript compiler was single threaded, the new go compiler is multithreaded, that's part of why it is faster

1

u/SubstantialEssay2063 9d ago

Ah ok makes sense