In my job, I switch between using Golang and Dart/Flutter, and I would love to use Dart all the time. However, I run into limitations in Dart that are easily solved when I use Golang instead. For example:
Embedded systems and cross-compilation. We build applications for embedded systems, Linux, and bare metal. I can sit on my Mac and compile for Embedded Linux instead of transferring the code to the device and compiling it there.
There’s even TinyGo for building firmware for chips that lack a modern operating system.
Networking. A simple thing like ARP scanning can’t be done in Dart. In Golang, it’s just another Tuesday. And not to mention HTTP/2 like you’d expect from a mature SDK from a company like Google .
These are small examples, but I run into things like this quite often where I realize that using Dart alone isn’t feasible without calling C code via FFI or similar workarounds.
I’ve even considered writing parts of the code in Go and calling it from Dart.
Sometimes it feels like the team behind Golang has infinite resources. And the community makes it shine even more with quality libraries like go.bug.st/serial.
I might be working in a niche sector, but I keep hitting these limits with Dart all the time, and it saddens me.
Maybe Golang is more suited for the things you need. I can imagine there’s a separate list of everything the Dart and Flutter ecosystem is better at than Golang. No one language can beat them all… optimizing for one thing is pessimizing for another and there’s no way around that.
Most pressing one for me: cross compilation.
Flutter seem to have bolted this on somehow, in a way that Dart does not officially support. That means that it has never been supported, or even thought of from a language perspective, which surprises me.
I guess AOT was a quick fix for Flutter, and Flutter handled x-compilation itself.
From what I understand of both languages, there’s a little difference in how it works.
Bundled assets, after compilation still exists as independent files. The binary knows where to look for them and what to do with the file. But that file exists as a whole.
Go’s embed lets you make the file part of the binary (and it probably is able to be smart during compilation and remove the bytes that aren’t needed). So the file no longer exists as an independent file in the compiled output
Dart on compilation makes a binary, flutter on the other hand isn’t just a binary and has these metadata files including assets in the final output
Using contents of this forum for the purposes of training proprietary AI models is forbidden. Only if your AI model is free & open source, go ahead and scrape. Flutter and the related logo are trademarks of Google LLC. We are not endorsed by or affiliated with Google LLC.