Understanding Rust's None and Some(T)

The Rust language doesn’t have values like NULL, None, null, nil, values that represent “nothing”, so how does Rust represent and handle “nothing”? When comparing objects, you need to check whether the two exist. Take this following Python code as an example def inorder(p, q): if p is None and q is None: return true if p is None or q is None: return False if not inorder(p.left, q.left): return False if p....

December 3, 2022

The Ownership in Rust

It is a pity that I have never seriously learned a low-level language. In the past few years, the most popular low-level language is Rust. It is said that Linux officials also recognize this language, hoping to use this language to replace some C language modules. I have been thinking to learn a low-level language seriously. Following the trend of Rust, I read The Rust Programming Language. Among the chapters, the ownership attracted me....

November 27, 2022