Hacker News new | ask | show | jobs
by mamcx 2545 days ago
This

>I have a very hard time grasping all the functionality/concepts

is (partially) because this

> if we ever want to control the tsunami of security flaws

Most focus in how the borrow checker work "against" you but that is not even the harder. Performance and how manage memory are more "painfull" in rust.

BECAUSE NOBODY KNOW HOW DO FAST & SAFE CODE.

Not ALL the time. Without extra help of the compiler your assumptions can get wrong in invisible ways...

Rust WANNA:

- See what is costly

- See what is unsafe or not

- See what own what

- See what is on heap or stack

The borrow checker is just a part of it.

From https://this-week-in-rust.org/blog/2019/07/02/this-week-in-r...

    Python and Go pick up your trash for you. 
    C lets you litter everywhere, but throws a fit when it steps on your banana peel. 
    Rust slaps you and demands that you clean up after yourself.

    – Nicholas Hahn
1 comments

> Python and Go pick up your trash for you.

> C lets you litter everywhere, but throws a fit when it steps on your banana peel.

> Rust slaps you and demands that you clean up after yourself.

> – Nicholas Hahn

This is brilliant and will save me time explaining language differences. Thanks for sharing.

Python and Go pick up your trash for you, but sometimes they get in your way while they do so. If you generate a lot of trash, you might find yourself stopped quite often.

C lets you litter everywhere, but if you or anyone else steps on your trash it will tackle you to the ground. Usually. Sometimes it ignores the first 10 times and does it on the eleventh.

Rust snatches up your trash as soon as you're done with it, but if it can't reason well about when you'll be done using it, it will make you fill out a form explaining how you plan to use it. It will also slap you silly if you try to deviate from that plan.