5 ms·
My very first use case for rust was to replace a ruby script that was running too slowly. The script did some free form text parsing and mathematical postproces
by saosebastiao 11y ago
My very first use case for rust was to replace a ruby script that was running too slowly. The script did some free form text parsing and mathematical postprocessing, and then dumped out a huge load file for SQLite. It took me much longer to initially write than the ruby script...but after throwing in all the debugging and error handling after the fact with the ruby script, I spent about half as much time writing it in rust. And that was with 2 years experience with Ruby and zero experience with rust. There is a lot to be said about a language that is strict, strongly typed, and with an emphasis on safety. If I'm shipping a product with my brand name attached to it, I would so much rather catch easy bugs at compile time than run time.
- bpicolo 11y agoThere are higher-productivity, strongly/statically typed languages out there that are probably more reasonable for typical applications programming
- saosebastiao 11y agoWith rust though, you get two things that you can't with the other strong/static languages: 1) extremely low resource usage (very helpful on a phone/tablet with limited resources), without an embedded runtime, and 2) native portability almost on the same level as C/C++. I admit, I have higher productivity with Scala and F#, but the productivity gap isn't insurmountable. The borrow checker isn't a huge problem once you get used to it, and that seems to be the biggest hurdle that others have. The biggest thing I find lacking in rust is a compelling asynchronous IO solution. I would love an async/await capability, or even better, something along the lines of F#'s computation expressions. Mio is making progress, but is extremely immature in comparison.
- moonchrome 11y agoYou did the hard part (developing the solution to your problem) in a high productivity language and then ported it over to Rust and it still took you longer. I mean you're completely ignoring the fact that Ruby lets you fire up the interpreter - write out some formulas to test if they work with some data - fix that logic and iterate over various stuff instantaneously. Consider how much time you would spend in Rust just recompiling for every iteration - not to mention dealing with a bunch of pointless typing and error handling as you're iterating over (or worse - ignoring all errors defeating their purpose in the first place). There is making the thing correct, robust and maintainable and there is getting something to work - and despite the common theme among dev forums the latter is much more important because without it you never might get to the first part.