3 ms·
I work at a startup with large amounts of JavaScript and Ruby, but no existing investment in a compiled language prior to Rust. Adding C++ to our toolchain wou
by ekidd 10y ago
I work at a startup with large amounts of JavaScript and Ruby, but no existing investment in a compiled language prior to Rust.
Adding C++ to our toolchain would result in a nasty culture shock. Ruby and JavaScript have modern dependency managers (bundler and npm/yarn). They're easy to get working cross-platform. They almost never segfault.
C++ would bring a whole host of issues (build systems, dependency management, pointers, segfaults, etc.). I didn't want to go there, and neither did my management. But Rust feels more like a modern scripting language (except with a steeper learning curve): It has cargo to handle dependencies and builds, it works cross-platform with minimal fuss, and it provides excellent protection against shooting yourself in the foot.
It turns out that I can use Rust for CLI tools, server applications and Node.js add-ons, and it's great at all of these things.
Plus, every time I write something in Rust, my coworkers are happy, because it's fast, it's easy to install, and it's "solid."
It does take a little while to bring people up to speed on Rust. It really helps to pair program and explain what's going on when they hit a speed bump.
- copx 10y ago>Ruby and JavaScript have modern dependency managers (bundler and npm/yarn). They're easy to get working cross-platform. Ruby is easy to get working cross-platform? The only fully supported platforms are Linux and OS X (and really only the Linux-like parts of OS X). Ruby on Windows is a trainwreck, and other platforms are not supported at all. Meanwhile C++ runs on everything and the toaster. Ruby might have many strengths but cross-platform support is not among them.
- steveklabnik 10y agohttps://bugs.ruby-lang.org/projects/ruby-trunk/wiki/SupportedPlatforms https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/Supporte... has many more than just Linux and OS X. (I still agree with you that it's not a super strong point.)
- ekidd 10y ago> Ruby is easy to get working cross-platform? Compared to a C++ project which relies on a half-dozen external libraries each with their own build system? Yes, in my experience. I've spent too much of my life converting autoconf scripts to Visual C++ project files. But Rust is definitely quite reasonable to get working on Windows, especially pure Rust, but small C extensions are OK as long as OpenSSL isn't involved. Usually I can just cross-compile or build using Travis CI.