4 ms·
This is true, but there's also a lot of trivial busy-work and confusion that the compiler and language foist on you that isn't security related. Like the fact t
by CountSessine 7y ago
This is true, but there's also a lot of trivial busy-work and confusion that the compiler and language foist on you that isn't security related. Like the fact that you always seem to have a &str when you actually need a String or vice-versa and your code is littered with .to_string() everywhere. Or figuring out what type your iteration is at a particular stage and why you can't call map() on it. Or figuring out the vicissitudes of what collect() will accept and convert for you and what it won't. Or clumsily dealing with a Vec of Results when what you really want is a Result with a Vec
Having a really sophisticated type system means...dealing with types a lot. I love Rust - especially ADTs and everything being an expression - but I wouldn't call it more productive than C++. And I think that was mikekchar's point?
- mplanchard 7y agoJust wanted to make sure you knew, you can use `.collect()` to convert an iterable of results into a Result with an iterable. See the 6th example here: https://doc.rust-lang.org/std/iter/trait.Iterator.html#examples-24 https://doc.rust-lang.org/std/iter/trait.Iterator.html#examp...