3 ms·
I agree with your parent's assessment. And I think it may be because Rust's multi-paradigm approach allows you to use what you need when you need it. > I can
by mustache_kimono 4y ago
I agree with your parent's assessment. And I think it may be because Rust's multi-paradigm approach allows you to use what you need when you need it.
> I can easily write something that doesn't use traits or iterators, panics all the time, and calls clone all over the place to satiate the BC and call it a day right?
You're basically not going to write your own traits until you've spent the time required to get something working. You'll copy and paste and modify to create another function.
If you're unfamiliar with iterators, then you'll write for loops. I was unfamiliar with iterators until I said, "I'm going to rewrite every for loop in this personal project as an iterator." Rust forces you to use lots of patterns re: memory, but forcing you locally to implement as a for loop or a iterator is not one of them.
I think a fear of clone() is wrongheaded. Most of the time it just doesn't matter.
When you think, ugh, this isn't the best I can do, it's time to learn iterators/traits, then you can modify the code to work then.
> But with all those features surely I'm missing as many pitfalls as I know about?
I guess my question would be: compared to what? I think the pitfalls are much, much, much more explicit in Rust, than C, like this won't even compile because this code has a condition which might be a null which I have not handled.
For app development, Rust really feels like a smallish language once you get over the hump.