Hacker News new | past | comments | ask | show | jobs | submit login

Just adding on to the other explanations here. Dart has little point outside of Flutter. We have tried to use Dart to create helper tools (which we'd usually do in Python) but because of the fact that threads can't efficiently share memory means it's basically useless for anything that is remotely intensive.

Dart uses a microtask queue which the Dart VM controls. Each process you run is called an isolate, with its own instance of the Dart VM and memory stack. The only way to speak to other threads is to use Send/ReceivePorts which have a massive overhead themselves. In our mobile app we do a lot with many cryptography algorithms. Originally we had to send each item to be encrypted/decrypted/signed to a background isolate to ensure the UI thread doesn't freeze. This is fine, for small requests, but once you reach the realm of tens of megabytes this process becomes slow as all hell. The recommended solution for this is to write the file to disk and just send the file location to the isolate. Which itself incurs IO overhead.

Anyway, our use case be damned, just the fact that because Dart runs a microtask queue with non-sharable memory makes it hard to use for anything other than Flutter.




Out of curiosity, why did you decide to pick up Dart instead of, say, Go? And what did you finally settle on?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: