3 ms·
> “It works for C/C++” by making developers working in those languages pay in blood for every dependency they pull in. I think the industry may have thrown the
by mattpallissard 3y ago
> “It works for C/C++” by making developers working in those languages pay in blood for every dependency they pull in.
I think the industry may have thrown the baby out with the bath water. Now they're is a complete aversion to RYO anything, no matter how simple. Personally, I'm waiting for the pendulum to swing back towards the middle a bit more.
- josephg 3y agoEh. I love rolling my own lots of things. At some point I really want to make a little OS kernel. How hard can it be? But then there’s things like rust’s rand crate which implements about 10 different random number generators, all with different properties around speed, whether they’re cryptographically secure and so on. And fed from a variety of entropy sources to make it work everywhere from Linux to windows to wasm. Look at this documentation. It’s an absolute master class. https://rust-random.github.io/book/guide-rngs.html https://rust-random.github.io/book/guide-rngs.html Do you need this? Probably not. You can probably get by with some wrapper around ar4random or whatever the recommended entropy source is today on your particular operating system. But I’ll be honest, until the day I decide to care about how rngs work, I’m going to just import the rand package. And serde & friends for json support. Criterion for benchmarking. And so on. Cargo is full of great libraries that are much higher quality than anything I’d ever throw together in a side project. For most of this stuff, you’d be mad to roll your own. This thread has reminded me that lots of people don’t know how nice it is to use a package manager like cargo. Here’s my favorite crate browsing website. You can see the most popular packages in every category and search. Look how much great stuff is in here. It’s humbling. https://lib.rs/ https://lib.rs/