Comment

Comment by andrewxdiamond

> The unique safety features of Rus are all about memory safety, which is not something you have to worry about at all in Python

Rust gets safety with its ownership system. The ownership system brings strong guarantees around who is mutating / reading any given object.

Python has uncontrolled ownership. Any function can generally mutate / store any variable you pass in. This can definitely cause bugs if a rouge function starts modifying input.

Rust makes this impossible without the mutation “permission” being part of the method signature. Strong ownership controls force functions to be extremely explicit with their intentions

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton