r/FlutterDev • • Jan 09 '22

Discussion Can Flutter/Dart replace JavaScript and React? If no, then Why

[removed] — view removed post

43 Upvotes

58 comments sorted by

View all comments

20

u/venir_dev Jan 09 '22

No.

The irony is that Dart was born (under the name "Dash") to replace JavaScript and to be interpreted directly by browsers. Google and half the internet had enough of JS but the reality is that it can't be replaced at the moment (nor 10 years ago).

If that trial didn't fail, we wouldn't have the Dart we know today and consequently Flutter.

[Opinion ahead] Flutter/Dart is a cross platform dev tool. Even tho it targets the web, at the moment I don't feel like it can be competitive against a JS framework.

Flutter will dominate the native market, that's for sure. It's very powerful there. On the web? Nahhhh

3

u/eibaan Jan 10 '22

Well, the Sky project (which later become Flutter) started independently from Dart and in an alternative reality without Dart they would have picked a different language. In our reality they looked at multiple languages and picked Dart because of its VM with hot code replacement (the AOT requirement was added much later AFAIK because of you cannot use JIT compiled languages on iOS and they didn't want to use a plain interpreter. In an alternative reality, another language would have the same hot code replacement feature because that's something inherited back from L Peter Deutsch's Smalltalk VM back in 1984, again AFAIK.

Perhaps, in that reality, they would have picked Bob Nystrom's Wren language which he created in 2014 which is early enough. Perhaps they would have looked at how the Apple Newton used a Pascal-Syntax-modified version of Self called NewtonScript and created a C-Syntax modified version of Self. Or looked at Apple's Dylan project which started as an elegant object oriented Scheme and became a Pascal-Syntax-modified abomination that provided a few ideas to Rust and Julia. Or they would have chosen Io which is a simplified Self with a metacircular syntax that is impossible to optimize. And I think, Lars Bak already moved on at the time, Sky started, and began to create a new language which is now called Toit – again a C-style variant of a simple Smalltalk-like OOP language sprinkled with a pinch of Python. There are a lot of possibilities for a Flutter framework based on a different yet similar language.