r/programming • • Jul 08 '26

Announcing TypeScript 7.0

https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/
468 Upvotes

128 comments sorted by

View all comments

Show parent comment

1

u/pjmlp Jul 10 '26

Sure, if only there was a way to do multi threading in nodejs.....

1

u/CherryLongjump1989 Jul 10 '26

postMessage called and asked you to explain the joke you were making.

You can't share JS objects across threads. Millions upon millions of GC'd heap objects for AST's, symbols, types, etc.

1

u/pjmlp Jul 10 '26

Ever heard of C++ Addons?

1

u/CherryLongjump1989 Jul 10 '26

You can't use a C++ addon to share javascript objects between threads. That's not how any of it works, so yeah there's that.

0

u/pjmlp Jul 11 '26

Who says that is the only way?

Learn how to actually use nodejs C++ APIs.

1

u/CherryLongjump1989 Jul 11 '26

Everyone says it's the only way. NAPI doesn't solve your problems.

Do you honestly think that the creator of TypeScript and C# is just sitting there thinking to himself, "shoot! If I had only learned how to use NAPI! I should have hired u/pjmip"?

1

u/pjmlp Jul 11 '26

It would have been a great offer, given I have used all version of Turbo Pascal since version 3.3.

Nevertheless, C++ is also AOT compiled, and C++ addons exist, exactly proving the point there is only so much V8 JIT can do by itself without additional help from C++ addons.