Remix.run Logo
mdhb 6 hours ago

I have no idea why people would want to write UI in Rust when Swift, Kotlin and Dart are much better suited for the job.

freedomben 4 hours ago | parent | next [-]

At least for me:

* I don't trust Swift on Android to be well supported, either now, or in the future. I would never want to rely on something Appley on a non Apple platform

* I dislike Swift and find it to be an unpleasant language. This is personal pref of coures, just like preferred flavors of ice cream

* Dart looks interesting and like a good option, though I don't want to learn a new language and Dart doesn't appeal to me because it feels like they took javascript and made it more like Java, and Java is in about the middle of my list of preferred langs (see above comment about preferred flavors of ice cream). Flutter is a killer app though and might be enough to sway me.

* Kotlin is a nice language, though not nice enough to where I'd want to use it outside of Android. The ties to the JVM-world tooling/dependency management is very offputting to me.

Overall I have a strong desire to use my preferred language(s) for everything if possible, so things like this are quite attractive to me for that reason. Now that said, when I write Android apps right now, what I typically use is Kotlin or Java because I've found I always end up having to write at least part of the app in those, so might as well keep it simple and consistent in one lang. But I'm always on the lookout!

andrekandre 2 hours ago | parent [-]

  >  I dislike Swift and find it to be an unpleasant language.
what do you find unpleasant about it?
rekireki 4 hours ago | parent | prev | next [-]

One of the reasons for me personally is a rich selection of packages from crates.io. For example if you are writing a server in Rust, and use something like https://crates.io/crates/reqwest for http requests, then you can reuse it in your mobile app. Also there's serde. You don't need to write the schema for your data if you have Rust on both server and client. Just make a shared crate and use serde to encode/decode the data. It really saves a lot of time if you don't have to use swagger or similar tools. And there's a documentation out of the box with `cargo doc`

mjmahone17 2 hours ago | parent | prev | next [-]

It’s kind of the same argument as that for Node: having a singular language for everything you do lets you have “thick” tightly coupled packages that do everything, which you can compose or decompose in a safe(r) refactor as business needs change.

Once you start using JNI or Objective-C++ to hand off “computationally expensive” work to common C++ (now Rust) libraries, you end up needing to become an expert across a lot of areas.

If 95% of your competitive advantage lies in doing things everywhere with low memory, then taking on an additional 2-3 stacks (SwiftUI + React + Compose) as well as all the bindings and build system and etc overhead can be pretty gnarly.

If 95% of your value add is in your web-based UI, consolidating to a single JS stack of React + React Native + Node can greatly reduce your idea-to-market time, I’d imagine a full Rust stack could do the same if your value add requires maximum performance and only a little UI iteration.

bbkane 5 hours ago | parent | prev | next [-]

One language vs 3 or 4? And some folks REALLY like Rust

saati 2 hours ago | parent | prev [-]

They are slow and memory-hungry.