3 ms·
I - on the other hand, feel like your comment somehow forgot that the op said “safety, speed and convenience”, so you attacked the least important point made in
by heavenlyblue 7y ago
I - on the other hand, feel like your comment somehow forgot that the op said “safety, speed and convenience”, so you attacked the least important point made in the first place.
It’s much easier to see the failure conditions in a Rust program rather than in bash. Also rust seems like easier to maintain, too.
- dymk 7y agoHow does having a borrow checker and snazzy memory safety benefit you when nearly all the operations you're performing are disk I/O? How is a 100 lines of rust easier to maintain than 10 lines of shell script? It's exactly what the other commnet said: "Writing a shell script in rust would be obnoxiously difficult for no real benefit."
- heavenlyblue 7y agoWell, for once Rust's type system can enforce the usage of objects (e.g. temporary file must be used or deleted). >> How is a 100 lines of rust easier to maintain than 10 lines of shell script? In 10 lines of _proper_ bash you won't be able to even check if the arguments supplied to the script even exist, let alone parse something more than simply subscripting argv[].
- mnutt 7y agoRust would be a step up from writing bash scripts of yore—imagine, being able to tell the difference between a variable being empty vs unset—but really any non-stringly-typed language will get you that, and the GC-based ones are unlikely to have memory errors and are generally fast enough for this purpose. I don’t think there would be anything wrong with a rust implementation of infrastructure management, but I also don’t think it’s the silver bullet to solve what plagues the space.