| ▲ | amazingamazing 9 hours ago | |
I always find it strange that flutter isn’t built with golang or typescript. Why use a new language? When flutter came out both languages existed so curious about that. The main reason i can think of is generics not existing initially | ||
| ▲ | billynomates 3 hours ago | parent | next [-] | |
Dart shipped in 2011, four years before Flutter started. On the technical side, Flutter needed AOT compilation to native ARM for release builds and a JIT for development (that's what makes stateful hot reload possible). Dart does both from one codebase. TypeScript means shipping a JS VM, which is precisely the overhead Flutter was designed to avoid. (In contrast to RN). Dart's other big win is GC tuned for allocating and throwing away tons of short-lived objects which is what happens when you hot reload over and over. Go has no JIT, so no hot reload, and no generics until 2022, Flutter has a big widget library so that would not have been possible. And of course the Dart team was inside Google, and had just lost its original mission when Chrome declined to ship the Dart VM, and was willing to change the language to suit Flutter. | ||
| ▲ | bbkane 8 hours ago | parent | prev [-] | |
I'm not sure why you're being downvoted, it's a super reasonable question. Iirc the reason is that the Dart team was willing to heavily modify the language and runtime to accommodate the needs of Flutter and the V8 team wasn't. I think this is the video that talks about this: https://m.youtube.com/watch?v=xqGAC5QCYuQ | ||