331 karma · joined May 14, 2008
If you need to store pointers and want to conserve a bit of memory, perhaps my compact_arena crate can help you.
Have you looked at the CVE stats of the last decade recently? Memory errors make up around 3/4 of that. Even if Rust would make the last quartile harder (which in my experience it doesn't), it could still be worth it for many applications where you cannot afford full verification, but want to avoid your users being pwned.
My recent 1-year review is on https://llogiq.github.io/2018/03/02/chromebook.html
For me clippy evokes the image of a well-meaning, if at times clumsy helper that tries to nudge you in the right direction. I find that very fitting for a tool that...well...tries to nudge you in the right direction of writing good, fast, idiomatic code.
I don't embrace the FP style either because while I generally limit mutation (`final` almost everywhere), I use mutation where it leads to code that is easy to understand, which would be exceedingly "clever" in FP style.
If C is like playing with knives and C++ is juggling chainsaws, Rust is like parkour suspended from strings&wearing protective gear. It'll look ridiculous at times, but you'll be able to do all sorts of cool moves that would otherwise be damn scary or outright impossible. You'll have so much fun you'll start trying to do it in other languages, too. And many of us never look back.
Especially when we hear stories about knife players ending up with a bleeding heart, and that one chainsaw juggler who lost their poodle. At the beginning, you fear the padding will hinder you, but by now you learned that its clever design allows you to move as fast as without it. A bit faster, actually, since you're no longer on the lookout for ledges you might stumble over.
Also you get new improved gear every six weeks, and between this and your newly built muscles, you start feeling like a super hero. This feeling is amplified by the community, which simultaneously does awesome feats and is really humble and open about it (you're by now accustomed to people being good at concurrency, and get slightly annoyed that your snake-charming friends insist on doing everything one step at a time).
You also met some folks you wouldn't have expected here, from a number of dynamic languages, braving the learning curve to descend into low-level programming, usually singing Rust's praises with unreal sounding benchmark comparisons.
You start looking with pity at your knive- and chainsaw-wielding friends. You see both their bruises and denial about said bruises. You'd want to offer them some of that awesome protective gear (by now you no longer feel the strings, because they seldom get taut), but you know the answer already. Poor folks.
We are super heroes. We are legion. Join us!
The crux with such systems is you tend to rely on them...
However, lints no longer need to be lightweight; I've seen full-program analysis passes called lints. And in rust, lints usually don't complain about tabs/spaces (though we could write one), but rather certain idioms which are exacerbating readability, flexibility, performance or any combination of the above.
> Thanks rust-clippy. We do love the great project.
This just made my day. :-)
Also I personally don't consider paths as strings, nor URLs – both are types for specific purposes with specific invariants, which are distinct from strings'.
Actually the approach has a weakness: The code may have hidden state that could change test results between runs. As mutations need to run the code many times, this can skew the results.
Here's a (IMHO) better proposition: Program with me and I'll teach you how to program. It's called Open Source and you don't need to move to get there.
It is so controversial because there are system programmers who have lived for so long with those problems that they now refuse their existence.
I wonder if algorithmic solutions like randome restart or simulated annealing could improve the outcome of A/B testing, too.