Live data from Hacker News

Flutter on desktop, a real competitor to Electron

medium.com

21–30 of 62 posts

Re: Flutter on desktop, a real competitor to Electron

#21

The road block for adoption will be Dart. Why they didn't just choose Typescript or go with native javascript is beyond me. No one uses Dart. It was probably the poorest design decision they could make.

The project originally started with JS. It wasn't possible to make it run fast enough on iOS. iOS requires AOT, or a byte code interpreter. JS isn't very suitable for AOT, and JS byte code interpreters tend to be pretty slow too.

Also quoting one of the project founders: "FWIW what we've seen in usability studies is that people who know JavaScript can pick up Dart without even noticing. (Literally, after an hour in a usability study we'd ask people what language they'd been using and they would respond with surprise, having not even noticed that it was a new language."

https://news.ycombinator.com/item?id=16477143

Re: Flutter on desktop, a real competitor to Electron

#22
post #16
post #14

I'm wondering why people don't write cross platform applications with Qt.

Does Qt have the same features as Flutter? I'm thinking about an excellent IDE, hot reloading, ability to target mobile and desktop etc.

* Excellent IDE

Yes. It's well-written C++. Any IDE can handle it, but the also have their own which gives you a few more things, like drag'n'drop design.

* Hot reloading

Depends.

Old-school Qt? No. It's more powerful, but can't hot reload.

New-school QML? Yes. But you are limited to QtQuick, which is only on-par with Electron's features.

* Ability to target mobile and desktop, etc.

Yes. Supported targets include: Windows, UWP, Linux, macOS, Andorid, iOS, watchOS, tvOS, QNX, and other embedded platforms.

Re: Flutter on desktop, a real competitor to Electron

#23
post #14

I'm wondering why people don't write cross platform applications with Qt.

I think c++ (and qml to some extent) scares people vs. JavaScript, where you have thousands of libs for every situation to back you up

You can write it in Python is you're scared of C++. QML let's you inline JavaScript, or call it from a file.

Qt comes with 5, 000 classes for every situation to back you up, before you need to go to the community.

I think that a lot of developers are simply scared of it, without just cause. They believe rumours, without ever actually trying to use the thing. They don't evaluate first.

Re: Flutter on desktop, a real competitor to Electron

#24
post #14

I'm wondering why people don't write cross platform applications with Qt.

Because Qt is bad. Do you think after nearly a quarter of a century that its problem is that it's just like, not well-known enough?

Correlation != causation.

And even if that was the reason, your response didn't make anyone any smarter. How is it bad? Which you can't answer, because your only line of reasoning is that it has to be bad, because it's not as popular.

Re: Flutter on desktop, a real competitor to Electron

#25
post #23

Earlier quoted context omitted.

I think c++ (and qml to some extent) scares people vs. JavaScript, where you have thousands of libs for every situation to back you up

You can write it in Python is you're scared of C++. QML let's you inline JavaScript, or call it from a file. Qt comes with 5, 000 classes for every situation to back you up, before you need to go to the community. I think that a lot of developers are simply scared of it, without just cause. They believe rumours, without ever actually trying to use the thing. They don't evaluate first.

pyside and pyqt4 both take away a lot from the power of qt. Not worth it if you ask me.

Re: Flutter on desktop, a real competitor to Electron

#26

The road block for adoption will be Dart. Why they didn't just choose Typescript or go with native javascript is beyond me. No one uses Dart. It was probably the poorest design decision they could make.

Tangential to your point, but I'm pretty shocked that dart didn't take off more than it did. JS is an awful language, and it was even worse at the time of Dart's introduction.

Re: Flutter on desktop, a real competitor to Electron

#27
post #14

I'm wondering why people don't write cross platform applications with Qt.

Because most Electron apps are JS devs working around browser issues by packaging a single browser with the application.

I look forward for the Electron wave to fade away just as MSHTML and XUL waves died before it.

Re: Flutter on desktop, a real competitor to Electron

#28

Earlier quoted context omitted.

Perhaps people will pick it up. I would like to think that people will eventually stop religiously sticking to JavaScript. Right now, they are forced to use it because the alternatives are more or less worse. I would like to consider it a beginning of something better.

Then why not TypeScript, which is a more powerful language than Dart and has a much better ecosystem?

Dart has a sound type system. Why would someone voluntarily deal with TypeScript unless forced to by the browser environment?

Re: Flutter on desktop, a real competitor to Electron

#29
post #5

Flutter isn't a competitor to electron as you can't target web browsers with it. I tried Flutter over a year ago and found the instant reloading of code nice and has most of modern features but went back to native as the library support is still non-existent. The real competitor to flutter is kotlin cross-platform from jetbrains. Most android developers are already familiar with kotlin, unlike dart, and also has grea…

It's not fully compatible with web yet but there is ongoing work to make it happen. Flutter itself is about to be officially released in two days and I am sure there will be more push to make it web compatible soon.

Re: Flutter on desktop, a real competitor to Electron

#30

The road block for adoption will be Dart. Why they didn't just choose Typescript or go with native javascript is beyond me. No one uses Dart. It was probably the poorest design decision they could make.

Dart 2 is a very solid language. It's primarily an OO language but does have some functional elements in it. It's very similar to Java and C# and most dart developers think it's a better version of Java and C#. It has more features like stream, asynchronous and mixins built into the language. It's in fact a full stack language as you can write server side code in dart as well. I think Google's long-term goal is to make dart/flutter compatible with mobile (iOS and Android), web, desktop (macOS, Linux, Windows). It will be truly write once and run everywhere.
Post reply on HN