WHY NOT RUST? TypeScript is rewritten in Go...

preview_player
Показать описание
Exciting news! TypeScript (compiler & typechecker) is rewritten in Go. Or to be precise: It's ported.
Obviously, parts of the web dev community are upset: Why didn't they choose Rust?
Well, turns out they had good reasons!

Socials:

Want to become a web developer or expand your web development knowledge?
I have multiple bestselling online courses on React, Angular, NodeJS, Docker & much more!
Рекомендации по теме
Комментарии
Автор

This logo is for RUST the game not the programming language xD

ezz_de
Автор

"Why not Rust?" asks the community of JavaScript developers who develop bloated applications using the least efficient language available and host them on Vercel, which is a wrapper around AWS.

o_glethorpe
Автор

The main problem with Rust is that their AST used cyclic references, which you cannot (easily) do in Rust. If they were to use Rust, they would have to support a completely different codebase. Plus the learning curve on Rust is much higher. But ultimately Go's concurrency model (allowing multiple go routinges to type check independantly on a shared AST), with the ability to have cyclic references in the AST, very fast compile times, native code generation, and the GC being similar to a JavaScript GC were the main factors. But I think the main issue was the AST (both parent-to-child and child-to-parent references) on top of Go's concurrency and GC.

therselman
Автор

IMHO It was a good move. A seasoned typescript developer can pick Go really fast. Contributors in JS will still be able to cooperate with the project.

albertoarmando
Автор

It's not a rewrite. It's a port. It's a fundamentally different. Rewriting a codebase means starting from scratch with e.g different architectural decisions. A port means copy/pasting from one language to another and make it backwards compatible with the least amount of effort.

marcuss.abildskov
Автор

Go is great for tooling. We’ve had people try rewrite JS tooling in rust and it took ages before they could release anything. Rust is a great language, but it’s very hard to get better performance then go if concurrency is something you need. I think the microsoft team did the right choice here.

keffbarn
Автор

If I were not retired and were starting a greenfield project from scratch, I would probably pick TypeScript for the frontend and Go for the backend. Both are easy to program and do not require a huge mental "context switch" for developers working on both parts. Also, if you hired competent TypeScript developers, they could learn Go quite rapidly.

grkuntzmd
Автор

For typescript type checker in Rust, there are already projects like Ezno or stc (archived today), what they want is a quick port to a native language.

agatemosu
Автор

I'm starting to put the Rust comunity/fans in a very specific place in my mind, next to the ARCH Linux guys and some other unpleasent groups... They won't let you be untill they make sure that you know their thing is the bees knees and there's nothing that compares to it and of course you know you are inferior if you disagree.

megapixeler
Автор

Rust could qualify as a religion nowadays

poo
Автор

I've read all the comments I can find. As you mention, but maybe don't emphasize enough... At the heart of the explanation is that the team will be working for _years_ with parallel code bases. I've done it. It's deeply painful. (To wit, see all the drama now occurring in the Linux kernel community over mixed Rust+C, which is easier than parallel code.) Anything that makes the translation closer to line by line syntax conversion is hugely beneficial because it brings you closer to having one mental model. By-language divergence in the model is the definition of error prone. The fact that the people who will be managing the port process spent real effort at investigation _with prototypes_ ought to be respected.

generessler
Автор

because parsing, compilation etc is, in many ways, a very deeply researched topic and we know how to parallel it. Go is a good language and it has a good runtime. You don't need Rust for everything, many things can be written as efficient as software in Rust. Plus Go is much easier, for example I can just write code in it and I am a C++ developer.

ShimonDanilov
Автор

if i use typescript for my lambda function will it improve the function performance?

syedshow
Автор

Uber has adopted Golfing as a primary programming language for developing microservices. Our Go monorepo consists of about 50 million lines of code (and growing) and contains approximately 2, 100 unique Go services (and growing)

akhilQXZnP-k
Автор

Imagine creating several languages but still choosing a different one for your compiler rewrite because it's just the best tool for the job - absolute ego-less goat move...

MaximBordyug.
Автор

It's not that "the TypeScript language will be written in Go", but people are thinking about rewriting the TypeScript compiler in Go.

maearon
Автор

Just why do u need to rewrite everything in rust, it's stupid. Go is perfect for this thing

podakov
Автор

As a Rust YouTuber and front end I don't know what to make of that thumbnail lmao

dustgg
Автор

we also have our key developer rewrite an API in go for a React app. Time to go take your Golang course 🙂

planetr
Автор

Half the benefit is using multiple cores/multithreading (10x was 4 threads). If you run it locally on a 10 core machine, you've got your 20x + benefit

planetr
join shbcf.ru