Flutter doesn’t need Kotlin (or anything else)
It’s not an exaggeration to say that I was super impressed by Flutter the first time I picked it up. Hot Reload, the declarative UI syntax, near (if not actual) native performance and easy access to the underlying OS. Cross-platform is a no-brainer in a mobile development world but I’ve never found a solution that executed it “right”. Flutter felt closer than anything else but one thing didn’t sit right.
Dart. Why Dart!? I thought.
I know this is the common thought process for a lot of people who are coming into Flutter fresh so I figured I’d take a crack at describing my general experience.
As I wrote more and more Flutter it was alongside more Kotlin (mostly) and I kept saying to myself “See? Look at this cool Kotlin thing it’s missing” and getting into a general huff about it. But as I started writing more Dart code, something changed. I started to really appreciate it.
I started to appreciate the simplicity of its asynchronous features, how complete the standard libraries are and features like method cascades that make your code nice to read. I still want(ed) things like Data Classes, Extensions and various language features I’d come to really love, but things started to seem not so bad. Dart 2 development was coming along and feature I know I’d suggested (along with others) were coming to fruition and things started seeming even brighter. “This Dart stuff is pretty neat” I started thinking.
To get a better feel for Dart I decided to try out AngularDart so that I’m not just using Dart in the context of Flutter. Flutter is / can be pretty specific, so the theory here was that may I just have some minor beefs with Flutter and not Dart itself.
The two realizations I made from this experiment is that: #1 — I freaking really like AngularDart, and #2 — It wasn’t Flutter, but getting more exposure to a language in a variety of situations is super important. Dart has a super rich ecosystem to tap into for a variety of situations and it’s worth digging deep. Either way, the end-result was that I felt pretty happy.
Can I say conclusively that its better than Kotlin or Swift? Absolutely not, nor is it worse. Ultimately Dart doesn’t have to be better either.
After all my experiences within the Dart / Flutter ecosystem the obvious parallel to draw here is a direct comparison to Ruby on Rails. Was Ruby the best, most well known language ever? No. Did people complain at the time and say they should have been using some other more popular language at the time? Yes. Did it achieve a tremendous amount and was it a better product because of Ruby? Absolutely.
The crux of it is that Dart is to Flutter what Ruby is to Rails. Neither would be possible without their respective language choices. If you want to read more on the actual technical reasons then you should check out the following article.
Why Flutter Uses Dart
Many linguists believe that the natural language a person speaks affects how they think. Does the same concept apply to…
So, when you pick up Flutter, just remember that you’re working toward an end goal and you’re not just the victim of arbitrary decisions. Decisions weren’t made because someone preferred one thing over another. Enjoy building!
P.S. The Flutter and Dart teams are also incredibly responsive and they love constructive feedback so I recommend reaching out.