I prefer other higher-level languages to Rust; I'd rather just work with garbage collection than wrangle the Rust borrow-checker. But if you need to write software that can't abide GC, Rust is basically the only memory-safe game in town.
I prefer other higher-level languages to Rust; I'd rather just work with garbage collection than wrangle the Rust borrow-checker. But if you need to write software that can't abide GC, Rust is basically the only memory-safe game in town.
Anyway, if we stick to standard commercial projects, I'd say the languages I enumerated are solid C++ (and Rust) competitors, because C++ at least isn't used to develop only super-performant or low-level bit twiddling SW, and I don't see why Rust would be either.
Obj-C was a solid C++ competitor on anything Apple and now Swift maybe even more so. It's a great language that can get you 95% there and I can almost guarantee that the remaining 5% won't be Rust, but rather C or C++.
Same goes more or less for Android with Java or Kotlin. Having a GC didn't stop them from becoming the platform standard, despite the embarassing growing pains they had.
It's really a game of platforms. Almost no one would pick a language because it's memory-safe, it's just a standard feature for most kinds of software developed nowadays.
For the SW where Rust and C++ would both be good fit (gaming?, audio, video, etc), C++ is entrenched and it's very unlikely that companies will have to justify using it instead of Rust in 2019 or 2020, erc when it's already the default in the first place.
Better syntax, improved semantics are nice, but if the debugging experience, IDE tooling and integration with platform libraries take a hit, then in the long run, the improvements aren't really worthwile.
However, given that Google (Fuchsia), Microsoft (IoT Core, Azure), Oracle (railcar), Amazon (Firecracker) are testing waters with Rust, I guess it might eventually become a blessed language in some of their systems.
But it will take time for sure, specially regarding tooling parity.
Java is the platform language, followed by Kotlin, which even with all Google love of latest, there are still a few corner cases where it isn't 1:1 with Java on the platform.
Finally there is C++, which comes on 3rd, with lots of caveats given the NDK evolution and integration into Studio.
Anything else brings their own set of problems, the headache of having the NDK as entry point into Android and JNI as FFI for Android APIs.
It might change given the price of their compilers versus free rustc, however those are industries that also certify compilers, which isn't going to happen for the time being for Rust toolchains.
Also Rust still isn't pin-compatible with COM/UWP or Objective-C runtime, and I guess we need to wait around one year until mixed language debugging experience is a thing across all major IDEs.
I doubt it, if you're counting users. Hundreds of millions of users of Firefox and Dropbox, just to name the first two that come to mind, use Rust code.
> Also Rust still isn't pin-compatible with COM/UWP or Objective-C runtime
What? Of course it is. We're shipping Rust code that uses COM and Objective-C in Firefox beta, right now (WebRender).
On my case I am counting systems in production.
Using COM is a tiny portion of COM development experience.
Where is the Rust support for creating COM and UWP components, including mixed mode debugging on Windows IDEs, likewise for Objective-C integration.
If I missed that, where can I find more about it?
Likewise, Rust has had support for creating Objective-C classes with methods written in Rust for ages. You can't usefully render OpenGL into a window on macOS without doing that.
> If I missed that, where can I find more about it?
How do COM type libraries get generated in Rust?
Both COM and Objective-C can be accessed from C, and Rust is compatible with the C FFI.
Anyone else that praises productivity uses programming languages that take care of the lowlevel boilerplate, and offer high level debugging experience on the respective IDEs.
I found this: https://github.com/SSheldon/rust-objc/
Implementing an XPC server or an IO Kit driver?
Writing Metal shaders?
These are the kinds of issues that I am referring to.
How about thread safety? Are there other thread safe games in town?